experchange > word.* > word.vba.general

Bungle (07-04-08, 02:38 PM)
I am writing a macro that have to insert RTF text from a database to Word.
I use the following instruction
"Selection.InsertFile filename:=vstrRTFFile"
According to this instruction always appears the following window
[URL=http://imageshack.us][IMG]http://img368.imageshack.us/img368/3895/immaginewc6.png[/IMG][/url]
[URL=http://g.imageshack.us/g.php?h=368&i=immaginewc6.png][IMG]http://img368.imageshack.us/img368/3895/immaginewc6.4c76b76dc7.jpg[/IMG][/url]

i press ok and everything go fine... but how can i disable it? on other
computer this window doesn't appear
Thanks
Jonathan West (07-04-08, 02:46 PM)
"Bungle" <Bungle> wrote in message
news:f6d4
>I am writing a macro that have to insert RTF text from a database to Word.
> I use the following instruction
> "Selection.InsertFile filename:=vstrRTFFile"
> According to this instruction always appears the following window
> [URL=http://imageshack.us][IMG]http://img368.imageshack.us/img368/3895/immaginewc6.png[/IMG][/url]
> [URL=http://g.imageshack.us/g.php?h=368&i=immaginewc6.png][IMG]http://img368.imageshack.us/img368/3895/immaginewc6.4c76b76dc7.jpg[/IMG][/url]
> i press ok and everything go fine... but how can i disable it? on other
> computer this window doesn't appear
> Thanks


Options.ConfirmConversions = False

Make sure your code is a good neighbor. Read the setting, change it, and
then change it back to the original value after you have inserted the file.
Klaus Linke (07-06-08, 08:39 PM)
"Jonathan West" <jwest> wrote:
> Options.ConfirmConversions = False
> Make sure your code is a good neighbor. Read the setting, change it, and
> then change it back to the original value after you have inserted the
> file.


I recently got bitten by that.

I used
Selection.InsertFile FileName:=sFileName, ConfirmConversions:=False
in a macro that I run a lot.

And then I was surprised that the option kept changing to "False".

IMO it's a bit of a bug that the code above changes the option globally...

Klaus
Similar Threads