How to "Insert as link" HTML file as plain text?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I am having problems including an external HTML file into Word as plain text
-- Word seem to insist on interpreting the HTML.

I hit this problem maintaining a MS Word specification document for a
software project . I keep sample code as external text files. The samples are
included in the specification doc by using the “Insert\File\Insert as Linkâ€
function in MS word.

This works well if the external files are plain text, or XML. However, if
the external file contains an HTML document, Word interprets the HTML when
doing the "Insert as link" procedure above and renders it, submit button and
all!

How can I get Word to avoid interpreting the HTML?
 
Hi =?Utf-8?B?U29uYW0gQ2hhdWhhbg==?=,

I know of no way to prevent Word from automatically applying a particular internal
converter when accessing a linked file. The IncludeText field (which maintains
these kinds of links) does have a \c switch for specifying a particular converter,
but I'm not aware of one for specifying "plain text".

It might make more sense to keep JUST the sample code in a separate file, and link
this into both the HTML and Word versions? Then you wouldn't run into this type of
conflict.
I am having problems including an external HTML file into Word as plain text
-- Word seem to insist on interpreting the HTML.

I hit this problem maintaining a MS Word specification document for a
software project . I keep sample code as external text files. The samples are
included in the specification doc by using the “Insert\File\Insert as Linkâ€
function in MS word.

This works well if the external files are plain text, or XML. However, if
the external file contains an HTML document, Word interprets the HTML when
doing the "Insert as link" procedure above and renders it, submit button and
all!

How can I get Word to avoid interpreting the HTML?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail :-)
 
Hello Cindy:

The external code was kept in a separate file - the problem was that the
"code" really just HTML. This was what I needed to 'included-text' into a
Word file.

I eventually got it working by specifying the AnsiText convertor. i.e. Right
clicking field > Edit Field > Ticking 'Text Convertor' and entering
'AnsiText' as it's value.

Doing a right click > 'Reveal Codes' now shows the field code as:
{INCLUDETEXT "\\\\server\\path\\to\\dir\\html.txt" \c AnsiText \*
MERGEFORMAT}

Thanks for your reply - I appreciate your caring to help.

Regards,
Sonam
 
Hi =?Utf-8?B?U29uYW0gQ2hhdWhhbg==?=,
I eventually got it working by specifying the AnsiText convertor. i.e. Right
clicking field > Edit Field > Ticking 'Text Convertor' and entering
'AnsiText' as it's value.
Thanks for coming back with this. Did you come across a list of such conversion
values, someplace?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Back
Top