Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link to MailMerge from a form

Status
Not open for further replies.

gmusgrave

IS-IT--Management
Joined
Apr 8, 2002
Messages
3
Location
GB
I need to add a command button to a form which will then open a query and start the Office Links/Merge it with Word wizard, can anyone help. I'm OK running the query (v. easy) but cannot figure out the link to Word

Ideally I'd like to bypass the wizard as I know the .doc I need to use, but I'm happy to take this one step at a time.

Any help will be much appreciated.
 
You could start off with the Shell command as one option. Sandy
 
Hi!

Is the query a stored query that doesn't depend on user input as on a form? If so, you have an easy answer. Set up the query as the data source of the mail merge in the Word document. Record a macro of the actual mail merge in the document and call the macro autoexec. Now all you button will need to do is open the Word document and the macro will take care of the rest.

If your query does depend on user input, then you can do something similar but more involved. Change you query into a Make Table query and run it. In the Word document, use the table you made as the data source for the mail merge and record the actual merge in a macro called autoexec. Now your button will need to delete the table, run the create table query and then open the Word document.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Thanks for that, I've managed to find some code that does the whole lot from a Module. If this gives me grief, I'll try the Word Macro option - I'm just a bit wary of that as I don't like autoexec macros in Word - sends a shudder down my spine!
 
gmusgrave,

Did your solution to this end up working? I'm currently trying to solve the same problem. Chris

It worked yesterday.
It doesn't work today.
That's Windows!
 
Our office has a process that from an ACCESS form a button opens Microsoft Word with a splash screen(template) in WORD and it makes visible a special Toolbar with individual buttons that when selected perform the MailMerge process for individual templates. This process works really well and only requites you to perform the MailMerge process in ACCESS using the Mail/Merge wizard on each template linking the query to the template and placing the MailMerge fields in the template one time. Then the VBA for Word Macro code of each button opens the WORD template as a new document for the user to finish filling in.

If this is what you are interested in let me know and I can post the code for this process. Bob Scriver
 
Use the wizard and a command button. One of the choices is application and one of those choices i to open WORD.

Does that help any??? If not email me and I will send you code to open a specific document or spreadsheet.


Rollie E
rollie@bwsys.net
 
sciverb,

I would certainly be interested in seeing the code, as, I am sure, will others.

Thanks,

Chris

It worked yesterday.
It doesn't work today.
That's Windows!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top