Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Don't save normal.dot

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dlevine54 - 29 Mar 2006 16:58 GMT
We have an application that reads a text file with bookmark names and values
which is merged into a Word document automatically by a VB.NET custom program
which then prints the merged document. Everything works except that when Word
is closing it pops up a message stating that Normal.dot can't be saved
because it is already open elsewhere. It also appears to be saving it in
Document and Settings someplace. The VB app runs on an unattended server and
each time a document is merged and printed another message pops up and I
can't have all these messages hanging around. My question is; is there a way
to prevent Word from trying to save Normal.dot?

Thank you.
Charles Kenyon - 29 Mar 2006 20:00 GMT
Yes. Change your application so it isn't creating or changing normal.dot.
Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> We have an application that reads a text file with bookmark names and
> values
[quoted text clipped - 12 lines]
>
> Thank you.
dlevine54 - 29 Mar 2006 20:15 GMT
Thanks for the reply but I'm not creating or changing the normal.dot. I open
a Word object, load a document and merge data into bookmarks, then save and
print it. There are no template changes. That's my poblem. I don't know why
it's asking to save teh normal.dot.

> Yes. Change your application so it isn't creating or changing normal.dot.
> > We have an application that reads a text file with bookmark names and
[quoted text clipped - 13 lines]
> >
> > Thank you.
Greg - 29 Mar 2006 20:36 GMT
I don't either.  It might be considered living dangerously, but if you
feel confident that nothing of consequence is changing in your template
you might try something like:

Sub Test()
Dim oState As String
'Get state at start
oState = ActiveDocument.AttachedTemplate.Saved
'Substitute the next three lines with your current code that is some
how changing
'the template
NormalTemplate.AutoTextEntries.Add Name:="Blue", _
   Range:=Selection.Range
MsgBox ActiveDocument.AttachedTemplate.Saved
'Set state to start state
ActiveDocument.AttachedTemplate.Saved = oState
End Sub
dlevine54 - 31 Mar 2006 14:56 GMT
Greg, I tried your suggestion but ' ActiveDocument.AttachedTemplate.Saved' is
not avialable in my code.  That line throws an error. The only function  
'ActiveDocument.AttachedTemplate' has is getType. What am I missing?

> I don't either.  It might be considered living dangerously, but if you
> feel confident that nothing of consequence is changing in your template
[quoted text clipped - 13 lines]
> ActiveDocument.AttachedTemplate.Saved = oState
> End Sub
Charles Kenyon - 01 Apr 2006 00:01 GMT
If you have an open document,
ActiveDocument.AttachedTemplate.Saved
gives a boolean value, True or False

Signature

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

> Greg, I tried your suggestion but ' ActiveDocument.AttachedTemplate.Saved'
> is
[quoted text clipped - 18 lines]
>> ActiveDocument.AttachedTemplate.Saved = oState
>> End Sub

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.