Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Natalie W. Natalie W. is offline
external usenet poster
 
Posts: 1
Default Automate a form by saving macros in the form template...?

Hi all,

MSOffice Online says "you can automate a form by saving macros in the form
template. The macros run automatically when the insertion point enters or
exits a form field. For example, if a user selects a MARRIED check box, an
exit macro can activate other related fields, such as NAME OF SPOUSE."

Okay, here's the prob...I've never used macros, and need to know how one
would create a macro like this one used in the example given. If I knew how
to do one like the one in this example (where the NAME OF SPOUSE appears only
after someone checks the MARRIED box), I could apply it to what I'm trying to
do.

Thanx in advance to anyone who can help--or even point me in the right
direction to where I could find the answer to this. I'm using Word 2003
version.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Bear[_2_] Bear[_2_] is offline
external usenet poster
 
Posts: 314
Default Automate a form by saving macros in the form template...?

Natalie:

You can get started with macros by recording one of your own. Click Tools
Macro Record New Macro. In the Record Macro dialog box, enter a name for
your macro. Don't bother assigning it to a toolbar or keyboard shortcut. DO
pay attention to the Store Macro In box. That specifies where the macro is
going to be saved.

In your case, you could either save it in the document or in the template
you created the document from. If you didn't create the document from your
special form template, you should probably save it in your document while
you're still in "test" mode.

There's no time element in recording your macro. You can go through the
steps as slowly as you like. You can click the Pause Recording macro any time
to perform actions that won't get recorded. Just remember to click it again
to resume recording.

Do something simple, like typing some text then applying a style to the
text. Then stop the recording by clicking the Stop Recording button.

Now let's look at the macro you recorded in the Visual Basic Environment
(VBE). The most direct way to get there is to click Tools Macro Macros.
In the Macros dialog box, select your document (not the template) in the
Macros In list. There should only be one macro that shows up in the Macro
Name list -- the one you just recorded. Select that macro, then click Edit.
This opens the VBE with the code from your macro displayed.

You can edit the code however you like. But for now, let's just use that
code as the exit macro from one of your form fields.

For any form field in your form, open the field's options dialog box by
double-clicking the field, then select your macro from the Run Macro On Exit
list. Switch to protected mode by clicking the Protect Form button, tab into
then out of your field. Your macro should run.

That's the overview. Once you have your form template designed, you can
record or create your macros there and delete the ones from your document.

For a detailed workout on these matters, please see Dian Chapman's excellent
tutorials:

http://www.mousetrax.com/TechPage.html#autoforms

Bear
--
Windows XP, Word 2000


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Field Macros Ms. Mary Microsoft Word Help 2 April 8th 07 05:38 PM
Opening global template as not read-only--saving macros. DanWLP Microsoft Word Help 1 September 21st 06 05:25 AM
i want to automate a form in word. one that users can fill out in BiliG21 Microsoft Word Help 1 July 6th 06 08:57 PM
How do I automate a template with form fields meldrape Microsoft Word Help 1 December 15th 05 07:28 PM
Macros in a protected form HiDbLevel Microsoft Word Help 1 April 18th 05 02:38 AM


All times are GMT +1. The time now is 11:50 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"