Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Saving a word Document created with a template programmatically
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 |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Saving a word Document created with a template programmatically
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 "WAFDOF" wrote: 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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove auto date from a word document created using a template | Page Layout | |||
Saving Files from a Document Created from a Template Using Filed Names | Microsoft Word Help | |||
How can I assign a created Word document template as the default ? | Page Layout | |||
WORD, created document use an existing custom template? | Microsoft Word Help | |||
Programmatically redact a word document | Microsoft Word Help |