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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Mailmerge-active window 1

Status
Not open for further replies.

PizMac

Programmer
Nov 28, 2001
90
0
0
GB
I am using the code

MyExtractName="PurchaserDetails"
DoCmd.SelectObject acTable, MyExtractName, True
DoCmd.RunCommand acCmdWordMailMerge

to effect a mail merge (with user selected Word document)from code on an 'on-click' event on a form - it works but..... it doesn't select the Word window - it leaves it minimizsed on the task bar and returns to the form - and the user (well we know what users are like!) thinks it hasn't happened and does it again (and again... and again.....)
I know there's a simple solution -- isn't there?
 
You would need to look at referencing the Word Object and calling the command through the word object to maximize etc.. the word window, I have done this before, but can't find the code I have used to do this. If you look under the Word VBA Help you should be able to find the solution.
 
You may also take a look at the AppActivate instruction.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top