Using macros in Form Fields

W

Wendy

Hi all,

I have discovered the use of Form Fields, which will do a good number of
things I wanted, but have noted that there is an area in the Option
Properties of a Form Field, noting that a macro can be run on both entry and
exit of the field.

I have a macro which contains a paragraph of words which can be inserted
into a form field. I can see the macro, and select it on the list, but I
must be missing something after that, because after I have OKed these
options, I haven't been able to make the macro appear in the document in the
place of the form field once I click into the field. Protecting the form
prevents the macro from running at all and gives a runtime error bug.

I see no instructions on using this option in the Help at all, the ? help on
the item says that it works based on what the 'insertion point' does -
presumably the entry icon I location - ie clicking into the form field, or
out of it?

TIA,
 
D

Doug Robbins

Whether you macro will work or not will depend upon just what it is doing.
If it is trying to insert something into a protected area of the document
(anything other than a formfield) it would be necessary for it first to
unprotect the document and then to re-protect it.

Tell us exactly what you are trying to do if you need more specific help.
Also, you should take a look at:

Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
W

Wendy

Hi Doug,

This is my scenario.

I want to create a set of 'template' style documents (they will be master
and subdocuments), and in these documents there are times when the admin
staff want to use the 'formfields' idea to both physically highlight and
bookmark areas of text so that the consultants can find areas of 'uncertain'
information quickly and deal with them.

There are some other places within these documents where, eg:

Statement A is selected to be inserted as a kind of 'PartA' answer. As the
'PartB' of the answer, there will be a choice of one of several paragraph
statements that could be inserted. (there will be several pages worth of
PartA answers etc, maybe 20 or so). I wanted to try and make it easy to have
all of these potential paragraph statements ready for insertion at the
correct location, without all the cutting/pasting from another doc that is
being done now. I had thought to do this with macros, and was looking for
the best way to have the macros 'ready at hand' for selection. Thought this
might be the best way to do it, but couldn't figure out how to make a
specific pre-selected paragraph/macro appear in the form textbox.

I've read through putting the stuff in VBA coding, and while I could handle
it, and adjust it later on, the admin staff simply aren't that skilled, so
that's why looking for other solution.

Maybe I need to do this another way instead - do you have suggestions?

Thanks,
 

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

Top