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

Open Word template for editing

Status
Not open for further replies.

48Highlander

Technical User
Feb 8, 2004
119
CA
How do I open a Word template for editing? I have the following code:
Code:
    Dim strTemplate As String

'   Launch Word and load the letter template
'   Late binding references to Word
    Dim objWord As Object
    Set objWord = CreateObject("Word.Application")
    
    Dim objDoc As Object
    objWord.Visible = True
    strTemplate = TemplatePath & Me.cboLetterSelect.Column(3)
    Set objDoc = objWord.Documents.Add(strTemplate)

This code actually opens the template but after it runs I get an error that Word cannot open the template.

Bill J
 
Code:
    Dim strTemplate As String

'   Launch Word and load the letter template
'   Late binding references to Word
    Dim objWord As Object
    Set objWord = CreateObject("Word.Application")
    objWord.Visible = True
    strTemplate = TemplatePath & Me.cboLetterSelect.Column(3)
    objWord.Documents.Open (strTemplate )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top