Automated Merge from command-line

W

Wes Dabney

I'm using Office 2000 SP3 and linking queries from Access to Word. I have it
setup now so from a form, a user can open the linked template with the
filters from the form applied to the linked query. My question is this, is
there anyway to automate the merge option from the dos command line, eg
"winword.exe somefile.doc -merge newfile.doc". If anyone knows of a way to
do this, it would save me with my less-than-savy users. Thanks.

--
Wes Dabney
Information Technology
Gary R. Traylor and Associates
Phone: 903-581-0500
Fax: 903-581-4245
 
P

Peter Jamieson

There are a couple of ways you can consider trying to get Word to do a merge
automatically:
a. put AutoOpen macros with the necessary code in the Mail Merge Main
Documents
b. use the command line options that let you specify the name of a macro to
run

If it makes sense for your users, you /might/ also be able to add a command
to the Windows shell so that they see a "Merge" option for Word documents,
or it might even make sense to use your own file extension (say ".docm" )
and set up the file associations to make such files merge by default when
they are opened. However, I think you would have to use the DDE facilities
in the shell and things are already looking complicated...
 
L

larrydalooza

Peter Jamieson said:
There are a couple of ways you can consider trying to get Word to do a merge
automatically:
a. put AutoOpen macros with the necessary code in the Mail Merge Main
Documents
b. use the command line options that let you specify the name of a macro to
run

If it makes sense for your users, you /might/ also be able to add a command
to the Windows shell so that they see a "Merge" option for Word documents,
or it might even make sense to use your own file extension (say ".docm" )
and set up the file associations to make such files merge by default when
they are opened. However, I think you would have to use the DDE facilities
in the shell and things are already looking complicated...

Anything you can do manually, you can automate with AutoIt

http://www.autoitscript.com/autoit3/

The forum is marvelous for help.

Lar.
 

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