Saving a word Document created with a template programmatically

G

Guest

I have scanned the message and really didn't see one that addressed this
question so I'll offer it up.

Using VB.net I do the following:

Dim wdApp As New Word.Application()
Dim wdDoc As New Word.Document
'wdApp.Visible = True
wdDoc = wdApp.Documents.Add("C:\Program
files\dot\AccPkg\maintrans3.dot")

I use bookmarks and macros to fill the necessary information. Originally I
had a problem when the user saved the .doc file that it was prompting for
them to save the .dot file as well. BEAR supplied an easy solution where I
end the routine with
wdDoc.Saved = True.

Now to the question. I would like to save the .doc file for the user....but
I can't do a wdDoc command as it is acting on the template...I need to act on
the newly created .doc.....

So my question is....when a .doc file is created by exectuing a .dot
file.....how do you differentiate from the .dot file to the .doc file? When
I tell it to save, how does it know to act on the .doc file instead of the
..dot file. You'll note the saved command I already activated saved the .dot
file....NOT the .doc file.

If this issue is in the wrong forum I apologize and would appreciate the
heads up to what the correct forum should be.

WAFDOF
 
G

Guest

I stand corrected. IT is indeed saving the .DOC form correctly, my issue
appears to still be with the .dot file. I'll need to do some more research
there.

WAFDOF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top