MSAccess to MSWord merge

S

slickdock

I have a generic MSAccess module that starts MSWord and merges a form
file with a data file. I create the data file through a TransferText
command that stores the MSAccess record as a text delimited file.

I want my module to further handle this requirement:

If [NameOfAdditionalMacroNeeded] field from the data file is not
blank, find the macro by that name in the user’s MSWord normal.dot and
execute it at the end of the merge.

I have posted this in the Word programmers group, but they can’t help
because they say its VBA.

Can anyone help? Thank you. I'm a rookie at VBA, so please go easy on
me!
 
A

AG

You need to use Automation.
Try posting in microsoft.public.word.vba.general.

--

AG
Email: npATadhdataDOTcom


I have a generic MSAccess module that starts MSWord and merges a form
file with a data file. I create the data file through a TransferText
command that stores the MSAccess record as a text delimited file.

I want my module to further handle this requirement:

If [NameOfAdditionalMacroNeeded] field from the data file is not
blank, find the macro by that name in the user’s MSWord normal.dot and
execute it at the end of the merge.

I have posted this in the Word programmers group, but they can’t help
because they say its VBA.

Can anyone help? Thank you. I'm a rookie at VBA, so please go easy on
me!
 
S

slickdock

I guess you didn't notice I explained I already posted to Word, and
they directed me to this group.
Can anyone help?
Thank you!
-Kathy
 
G

Graham Mandeno

Hi Kathy

You should be able to use the Application.Run method:

WordApp.Run [NameOfAdditionalMacroNeeded]

You might need to fully qualify the macro name:

WordApp.Run "Normal.YourModuleName." & [NameOfAdditionalMacroNeeded]
 
A

AG

Yes, I did see that, but you did not say which group you posted to as there
are several.
It sounds like you need to use automation and
microsoft.public.word.vba.general is a good group for that.
I have done Word automation from Access and have gotten good help from that
group and my project was much more complex than yours sounds. It makes
little or no difference whether automation is done from Word, Excel or
Access, the code is the same.
 

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