First go with a template

C

Curt

Can anyone show me what I've done wrong in trying to open this template.
Location of template is c:\parade\Annc.temp
Let me throw my last thoughts out also. That is to try to create a macro
that will format a word.doc for printout. Have a macro that will populate the
template when I open it manually.
Thanks

Dim word As New word.Application
Dim wordDoc As word.Document
word.Visible = True
Set wordDoc = Template.Open("C:\Parade\Annc.temp")
With wordDoc
..Application.Run "tempprint1"--this fills template with a merge
 
D

Doug Robbins - Word MVP

From where are you running this code? There is no command Template.Open in
the Word Object Model, not Templates.Open.

If you want to create a document from a template, if that is what
"Annc.temp" really is, then you would use

Set wordDoc = Documents.Add("C:\Parade\Annc.temp")

If what you want to do is open the file Annc.temp, then you would use

Set wordDoc = Documents.Open("C:\Parade\Annc.temp")
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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