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

word switch to open 2 files a a template and a macro

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
Does anyone know the syntax to open two files say

C:/File1.doc and C:/File2.doc using the template MyTemplate.dot and also run macro Mymacro from this template?

Cheers.
 
Have a look at the first argument of the Documents.Add method and at the Application.Run method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for replying PHV.

I was originally using the shell command from Access to open the documents specifying a macro with /m but also require it to open with a specific template now as well. Does your suggestion still apply to this?

Have you any examples?
 
If File1.doc and File2.doc were created from MyTemplate.dot then the macro code is available from those files.

What do you mean "open with a specific template"? Do you mean the documents are NOT created from the template, and you need to attach a new template to them?

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top