InsertFile method leaves certain text out after insertion.

T

terrakian

I am using the InsertFile method to insert the contents of a text file into a
Word document, like so:

.Selection.InsertFile TextFileName, Range:="", _
ConfirmConversions:=False, link:=False, _
attachment:=False

I have found that certain text is left out after insertion by Word, e.g.
"+/-". When I try the insert file command from Word itself, a confirm
conversion box will pop up, and allow me to force a "Plain text" conversion,
which in turn leaves in the missing text after insertion. However, I cannot
find a way to force this programmatically.

Wd 2k, '03; Win XP, 2000

Any assistance would be appreciated.

Thanks.
 
D

Doug Robbins

You may need to open the file first so that you can use

OpenFormat:=wdOpenFormatText

Then insert the range of that document as FormattedText.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

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