Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Sep 2007
    Posts
    54
    Thanks
    7
    Thanked 1 Time in 1 Post

    Paragraphs don't copy over properly in form fields (VBA/Word 2003)

    I have a court form that needs to be put on the system. It is four pages long and consists of duplicated information on all four pages and then a few minor changes. I have done the form in Word and using form fields, am trying to do a simple macro that will enable the user to only fill in the fields on the first page and then the macro will copy over the information on the other three pages. The problem I am having is that if there are paragraph marks in the field, the paragraph marks don't copy over, I only get little blank boxes and all the text is continued on one line. My code is Witness$=.formfields("Witness").result
    and then to copy it
    .formfields("witness2").result=witness$

    What am I missing to make it copy the text exactly as it was originally typed out in the formfield? Would it be better to create a User Box to catch this information or can I do it directly from the form?

    Thank you so much for your input.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Paragraphs don't copy over properly in form fields (VBA/Word 2003)

    Hi maverik,

    Since you're using Word's formfields, you don't need a macro. All you need to do is to:
    . give the formfield a bookmark
    . set the formfield's properties to 'calculate on exit'
    . insert a cross-reference to your formfield's bookmark wherever you want the data replicated
    . protect your document for forms
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •