From: Ralph on
catharinus wrote:
> Hello to you all
>
> I use word in a vb6 application to show a rft-file. See the code
> below. When I want to close the Word-dociument, Word asks me the
> following:
> "The file norma.doc already exists. Do you wnat to replace the
> existing file" After answeering 'No' I want to close Word itself.
> Then I get the following question: Changes have been made that affect
> the global template. Do you wnat to save those changes"
>
> Why do I get those questions and how can I prevent those questions in
> my vb6-application?
<code snipped>

[Warning: Unsatisfactory answer follows. <g>]

This happened to me just recently after installing Office Pro 2007 on a new
box. After some online research (and several possibilities) I found the
problem disappeared when I did a full manual uninstall of the Norton AV
suite (a 'free' initial install which I assumed I had removed.)

Other suggestions include changing the security settings for macros,
changing options for how Normal.dot is managed, etc. You can go browse
yourself. The actual file name is not special, ie, the error may report any
odd file name, e.g. "<abc>.DOC" and not just "norma.doc".

Anyway, the problem is NOT related to anything specific in Automation code,
but seems to be related to the Word/Office configuration/environment itself.
So I suggestion you re-post your question to a MS Word/Office newsgroup.
Leave out you are using Automation (that is a red-herring), just that you
have a problem when a doc or Word is closed.

-ralph


From: catharinus on
On 13 feb, 18:01, "Ralph" <nt_consultin...(a)yahoo.com> wrote:
> catharinus wrote:
> > Hello to you all
>
> > I use word in a vb6 application to show a rft-file. See the code
> > below. When I want to close the Word-dociument, Word asks me the
> > following:
> > "The file norma.doc already exists. Do you wnat to replace the
> > existing file"  After answeering 'No' I want to close Word itself.
> > Then I get the following question: Changes have been made that affect
> > the global template. Do you wnat to save those changes"
>
> > Why do I get those questions and how can I prevent those questions in
> > my vb6-application?
>
> <code snipped>
>
> [Warning: Unsatisfactory answer follows. <g>]
>
> This happened to me just recently after installing Office Pro 2007 on a new
> box. After some online research (and several possibilities) I found the
> problem disappeared when I did a full manual uninstall of the Norton AV
> suite (a 'free' initial install which I assumed I had removed.)
>
> Other suggestions include changing the security settings for macros,
> changing options for how Normal.dot is managed, etc. You can go browse
> yourself. The actual file name is not special, ie, the error may report any
> odd file name, e.g. "<abc>.DOC" and not just "norma.doc".
>
> Anyway, the problem is NOT related to anything specific in Automation code,
> but seems to be related to the Word/Office configuration/environment itself.
> So I suggestion you re-post your question to a MS Word/Office newsgroup.
> Leave out you are using Automation (that is a red-herring), just that you
> have a problem when a doc or Word is closed.
>
> -ralph

Oke, thanks
From: Ralph on

"catharinus" <csvanderwerf(a)planet.nl> wrote in message
news:b80956f3-5064-43f7-97ba-82cceabf758c(a)15g2000yqi.googlegroups.com...
> ... The actual file name is not special, ie, the error may report any
> odd file name, e.g. "<abc>.DOC" and not just "norma.doc".
>

Just now noticed (yes, I'm really that dull at times) you used "Norma.dot"
in your title, but "Norma.doc" in the body.

If Word is complaining about "Normal.DOT" then it is a matter of adjusting
Word's security and/or template handling. I vaguely remember there being a
problem if you stored templates in multiple places. Automation will *assume*
the default.

If it is complaining about "<SomeOddFileName>.DOC" then it is likely due to
a collision between both the configureation and an intermediate 'service'.

hth
-ralph


From: catharinus on
On 13 feb, 21:12, "Ralph" <nt_consultin...(a)yahoo.com> wrote:
> "catharinus" <csvanderw...(a)planet.nl> wrote in message
>
> news:b80956f3-5064-43f7-97ba-82cceabf758c(a)15g2000yqi.googlegroups.com...
>
> > ... The actual file name is not special, ie, the error may report any
> > odd file name, e.g. "<abc>.DOC" and not just "norma.doc".
>
> Just now noticed (yes, I'm really that dull at times) you used "Norma.dot"
> in your title, but "Norma.doc" in the body.
>
> If Word is complaining about "Normal.DOT" then it is a matter of adjusting
> Word's security and/or template handling. I vaguely remember there being a
> problem if you stored templates in multiple places. Automation will *assume*
> the default.
>
> If it is complaining about "<SomeOddFileName>.DOC" then it is likely due to
> a collision between both the configureation and an intermediate 'service'.
>
> hth
> -ralph

Thanks Ralph
From: Norm on


"catharinus" <csvanderwerf(a)planet.nl> wrote in message
news:354e831b-c06b-4699-89d3-b3fbe6c9f872(a)v25g2000yqk.googlegroups.com...
> On 13 feb, 21:12, "Ralph" <nt_consultin...(a)yahoo.com> wrote:
>> "catharinus" <csvanderw...(a)planet.nl> wrote in message
>>
>> news:b80956f3-5064-43f7-97ba-82cceabf758c(a)15g2000yqi.googlegroups.com...
>>
>> > ... The actual file name is not special, ie, the error may report any
>> > odd file name, e.g. "<abc>.DOC" and not just "norma.doc".
>>
>> Just now noticed (yes, I'm really that dull at times) you used
>> "Norma.dot"
>> in your title, but "Norma.doc" in the body.
>>
>> If Word is complaining about "Normal.DOT" then it is a matter of
>> adjusting
>> Word's security and/or template handling. I vaguely remember there being
>> a
>> problem if you stored templates in multiple places. Automation will
>> *assume*
>> the default.
>>
>> If it is complaining about "<SomeOddFileName>.DOC" then it is likely due
>> to
>> a collision between both the configureation and an intermediate
>> 'service'.
>>
>> hth
>> -ralph
>
> Thanks Ralph

You might try something like the following in your code to see if it is your
code causing the problem or something in Office.

moApp.DisplayAlerts =wdAlertsNone

If you use this line before saving the word document you should not get any
messages.

Norm