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.

Re: Don't save normal.dot by Charles

Charles
Wed Mar 29 13:00:56 CST 2006

Yes. Change your application so it isn't creating or changing normal.dot.
--
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.


"dlevine54" <dlevine54@discussions.microsoft.com> wrote in message
news:69CE62F4-DB1C-4A83-B1F5-E7D94CD76DBE@microsoft.com...
> 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.



Re: Don't save normal.dot by dlevine54

dlevine54
Wed Mar 29 13:15:02 CST 2006

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.

"Charles Kenyon" wrote:

> Yes. Change your application so it isn't creating or changing normal.dot.
> --
> 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.
>
>
> "dlevine54" <dlevine54@discussions.microsoft.com> wrote in message
> news:69CE62F4-DB1C-4A83-B1F5-E7D94CD76DBE@microsoft.com...
> > 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.
>
>
>

Re: Don't save normal.dot by Greg

Greg
Wed Mar 29 13:36:13 CST 2006

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


Re: Don't save normal.dot by dlevine54

dlevine54
Fri Mar 31 07:56:02 CST 2006

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?

"Greg" wrote:

> 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
>
>

Re: Don't save normal.dot by Charles

Charles
Fri Mar 31 17:01:50 CST 2006

If you have an open document,
ActiveDocument.AttachedTemplate.Saved
gives a boolean value, True or False

--
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.


"dlevine54" <dlevine54@discussions.microsoft.com> wrote in message
news:0E5C43DC-B1FE-445B-8A60-2282A0AFDAB4@microsoft.com...
> 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?
>
> "Greg" wrote:
>
>> 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
>>
>>