Macro on Opening Word document

H

hiteshkataria

Hi,

I want to have a macro to be run on opening the Word file.

Background:
The word document contains the address labels created using Mail merg
wizard whose source is MS Excel.

Whenever the Word document is opened, a popup box appears with th
following message:

Opening this document will run the following SQL command:
SELECT * FROM 'Sheet1$'
Data from your database will be placed in the document. Do you want t
continue?

(with two buttons) Yes No

Requirement:
I want a macro in this document, such that on opening the file, th
'Yes' option should be selected automatically.
And after this, Merge to New Document option of Mail merge should b
followed with ALL option being selected.

Can you please help me in writing a macro for this.

Thanks
 

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