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

Winword & VBA - creating a DOC from a DOT? 1

Status
Not open for further replies.

Viz

IS-IT--Management
May 30, 2001
5
GB
Dim Document
Dim Application
Dim blnError
Set Application = CreateObject("Word.Application")
Application.Visible = True
Application.Documents.Open ("c:\mytemplate.dot")

This only opens the template. How do I create a new document from a template?

Appreciate any help...
--
Viz
 
Use the Documents.Add method rather than the Open method:
Code:
Documents.Add Template:= _
        "C:\Temp\YourFile.dot" _
        , NewTemplate:=False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top