start new document from template

Q

Question Boy

I am trying to launch Word from Access and start a new doc from a template.

I tried:

Application.FollowHyperlink "c:\...\MM.dot"

This does indeed open the dot file but I am looking to launch it to create a
new doc from it, and thus run it's Document_New event in the process.

What is the proper way of doing this, since FollowHypelink is obviously not
it in this case.

Thank you,

QB
 
Q

Question Boy

I am not sure if this is the proper way, but it seems to work

Set objApp = CreateObject("Word.Application")
With objApp
.Visible = True
.Documents.Add Template:=sTxtPath & "MM.dot", NewTemplate:=False
End With

Where sTxtPath is the full path to the template file.

I hope this might help someone else in the future.

QB
 
J

Jay Freedman

Yes, this is the proper way.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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