Howto duplicate text in diferent places of a form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm creating a form and I need the duplication of some information.
At the moment I have two choices:
1. Copy and past the duplicated parts of the document;
2. Hand write the duplicated parts after print the document
What I’m asking is if some one knows if it is possible to make an
auto-duplication of phrases in a form, and if the answer is yes, how can it
be done.

Best Regards
 
I'm creating a form and I need the duplication of some information.
At the moment I have two choices:
1. Copy and past the duplicated parts of the document;
2. Hand write the duplicated parts after print the document
What I’m asking is if some one knows if it is possible to make an
auto-duplication of phrases in a form, and if the answer is yes, how can it
be done.

Best Regards

See http://gregmaxey.mvps.org/Repeating_Data.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
You could record a macro that copies the data from one form field to the
target form field and then use that macro as the macro to run on exit from
the field.

To specify a macro to run and assign it to a trigger event, double click on
the form field you want to copy from and specify the macro to run on exit in
the MACRO TO RUN panel in the lower-left corner of the TEXT FORM FIELD
OPTIONS dialog box.
 
You can run a macro when exiting the form field that copies the data in the
form field to the target field.

A macro similar to this example would work:

Sub PostVals()


Dim doc As Document
Dim ff1 As FormField
Dim ff2 As FormField

Set doc = ActiveDocument
Set ff1 = doc.FormFields("Text1")
Set ff2 = doc.FormFields("Text2")

ff2.Result = ff1.Result

Set doc = Nothing
Set ff1 = Nothing
Set ff2 = Nothing

End Sub

To assign a macro to a form field event, double click on the form field that
is the source of the copy, and in the lower left panel select the Run Macro
on Exit event and select the macro to run from the drop-down list of
available macros.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top