Jay
Mon Aug 09 22:25:00 CDT 2004
"pulse" <pulseknip@home.nl> wrote:
>> Private Sub Document_New()
>> Dim myDoc As Document
>> Set myDoc = Documents.Open("c:\test.doc")
>> myDoc.AttachedTemplate = "c:\test.dot"
>> End Sub
>>
>> However, it does seem a bit strange to open an existing document whenever
>> you create a new blank document. Do you want to have them both open at the
>> same time? What are you trying to achieve?
>
>Thanks for the reaction.
>Sorry, I mean the Document_open event...
>
In that case, your Document_Open() procedure should not contain a
Documents.Open statement -- the document will already be opening --
and instead of a MyDoc object you can just use ActiveDocument:
ActiveDocument.AttachedTemplate = "c:\test.dot"
--
Regards,
Jay Freedman
http://aspnet2.com/mvp.ashx?JayFreedman
Microsoft Word MVP FAQ:
http://word.mvps.org