Open a new Word Document with a template (like somenname.dot)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have checked some posts, but still can't figure out,
how do I open a new Word document using a template?

Any helpful hint would be welcomed. Thanks in advance.


jokobe
 
File > Open if the template is stored in the default location, but you would
do better asking this sort of question in a Word newsgroup. This one is for
Microsoft Access, a relational database program.
 
thx for your answer.
Haven't been all to precise posting the question. Actually I do know how to
open a new document using a template in word.
But I want to start word from access, opening a new document based on a
selected template.

My work around now is like this: I open the template, populate it with data
and
save it as a word document, not with extension .dot.
But this only seems a workaround. There should be a way to create a new
document based on a dot file.

anyhow, thx for trying to help

jokobe
 
I was curious, so I checked around and found this:

Dim WordDoc As Word.Document
Dim WordAppl As Word.Application
Dim strTemplate As String

Set WordAppl = New Word.Application
WordAppl.Visible = True
strTemplate = "C:\YourFolder\YourTemplate.dot"
Set WordDoc = WordAppl.Documents.Add(Template:=strTemplate)

I found that I had to set a reference to the Word Object library to avoid a
compile error. It seems to be the same general approach as the code in the
link you provided, except that the link includes some useful information
about the default path.
 
Back
Top