Insert RTF File... Disable "Conversion File" window

B

Bungle

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



i press ok and everything go fine... but how can i disable it? on other
computer this window doesn't appear
Thanks
 
J

Jonathan West

Bungle said:
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



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

Klaus Linke

Jonathan West said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top