|
-
Sep 8th, 2000, 09:04 AM
#1
Thread Starter
Lively Member
Hi, I have a problem with a word template. When the template loads a form pops up that allows the user to fill out some fields (this is for a fax) then they click O.K. and the Fax template is populated with the information for the form. the problem is when you use the template again, with the first template still open, it will try to populate the info over the CURRENT doc instead of opening up a new one. Any Ideas?
-
Sep 8th, 2000, 10:57 AM
#2
Junior Member
With Word there are a lot of problems to know what document in the document collection is the document that you are referencing.
Few time ago i have a similar problem like this and after trying a lot of Word options the only solution was close the document before opening a new one. But you can try this:
Dim wDoc as Word.Document
Dim wApp as Word.Application
Set wApp=New Word.Application
set wDoc=wApp.Documents.Add([Name of your template],False)
And the object wDoc have the reference to the document you need.
-
Sep 8th, 2000, 07:00 PM
#3
Addicted Member
I am sorry I did not understand the problem earlier.
Why don't you use Word.ActiveDocument to do the job? ActiveDocument can be used to control the new document created from the template.
To see what I mean, place this code in the New event of a new document template, and create a new file from the template.
msgbox Word.ActiveDocument.Name
A message will appear showing the name of the new document.
-
Sep 11th, 2000, 07:41 AM
#4
Thread Starter
Lively Member
This will work! Thank you! Thank you very much!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|