In a VB6 application I am trying to open a Word template (.dot file). I'm using the same code for this that I'm using to open standard Word (.doc) files, namely:
Dim wrdapp As Word.Application
Set wrdapp = CreateObject("Word.application"
wrdapp.Documents.Open "<directory>" & "<filename>.dot"
Now this code works fine if I use it to open a .doc file, but I do not get the desired result with a .dot. What I want it to do is the same thing that happens if I open a .dot from Windows Explorer: namely, create a new document based on this .dot. What actually happens is that the file is opened as a template, allowing me to make changes to the template but not to base a new document on it.
Is there anything I should change about my code so that the same effect is achieved that double-clicking a .dot from Windows Explorer would have?
For the record, the Word versions involved are Word 97 and Word 2000 (differs per client system), but for .docs at least, my current code works with either.
Thanks in advance!
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)
Dim wrdapp As Word.Application
Set wrdapp = CreateObject("Word.application"
wrdapp.Documents.Open "<directory>" & "<filename>.dot"
Now this code works fine if I use it to open a .doc file, but I do not get the desired result with a .dot. What I want it to do is the same thing that happens if I open a .dot from Windows Explorer: namely, create a new document based on this .dot. What actually happens is that the file is opened as a template, allowing me to make changes to the template but not to base a new document on it.
Is there anything I should change about my code so that the same effect is achieved that double-clicking a .dot from Windows Explorer would have?
For the record, the Word versions involved are Word 97 and Word 2000 (differs per client system), but for .docs at least, my current code works with either.
Thanks in advance!
"Much that I bound, I could not free. Much that I freed returned to me."
(Lee Wilson Dodd)