By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

Call a macro from a field in a record

P: n/a
My vb code saves a record as a Word merge data file and merges it with
a Word merge form file. Once the merge is complete, I would like the
code to make this determination:

There will always be a field in the merge data file called
[OptionalChainedMacroName]. It may or may not be blank. If it is not
blank, I would like to call a macro after finishing the merge. The
macro to be called is equal to the contents of the
[OptionalChainedMacroName].

In this example, lets say the contents of the field
[OptionalChainedMacroName] is "Macro_For_Form_A."
Sub Macro_For_Form_A() exists in the normal.dot.

If the field in the merge data file called [OptionalChainedMacroName]
is not blank, call Macro "Macro_For_Form_A" after finishing the merge.
Aug 4 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Mon, 4 Aug 2008 11:23:07 -0700 (PDT), sl*******@yahoo.com wrote:

Check out DoCmd.RunMacro in the help file.

-Tom.
Microsoft Access MVP

>My vb code saves a record as a Word merge data file and merges it with
a Word merge form file. Once the merge is complete, I would like the
code to make this determination:

There will always be a field in the merge data file called
[OptionalChainedMacroName]. It may or may not be blank. If it is not
blank, I would like to call a macro after finishing the merge. The
macro to be called is equal to the contents of the
[OptionalChainedMacroName].

In this example, lets say the contents of the field
[OptionalChainedMacroName] is "Macro_For_Form_A."
Sub Macro_For_Form_A() exists in the normal.dot.

If the field in the merge data file called [OptionalChainedMacroName]
is not blank, call Macro "Macro_For_Form_A" after finishing the merge.
Aug 5 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.