Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
WAFDOF WAFDOF is offline
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
WAFDOF WAFDOF is offline
external usenet poster
 
Posts: 7
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove auto date from a word document created using a template Confused Page Layout 3 May 8th 23 08:50 AM
Saving Files from a Document Created from a Template Using Filed Names aspen Microsoft Word Help 1 March 4th 07 06:52 PM
How can I assign a created Word document template as the default ? Mike Page Layout 1 October 20th 06 10:23 PM
WORD, created document use an existing custom template? bates Microsoft Word Help 2 March 27th 06 05:17 PM
Programmatically redact a word document Pilotgod Microsoft Word Help 4 December 30th 05 02:07 PM


All times are GMT +1. The time now is 04:09 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"