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.

Re: InsertFile method leaves certain text out after insertion. by Doug

Doug
Tue Dec 07 22:10:57 CST 2004

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
"terrakian" <terrakian@discussions.microsoft.com> wrote in message
news:A8779867-D99C-4BE2-B26D-D47DBE56001F@microsoft.com...
>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.