Suppose I have code that gets these two strings
stringRegular = lineRange.Text
stringFormatted = line2Range.WordOpenXML
The first string should be plain text. The second string should be text that comes with its formatting (bold, italic, colors, etc). I expected that to be true because the second string is XML that Word can interpret.
Now that I’ve obtained the two strings, I want to insert these two strings in a new Word document.
So I add these two lines:
newDoc.Content.InsertAfter stringRegular
newDoc.Content.InsertAfter stringFormatted
I find when I do this, that the first string (plain text) is inserted correctly. The second string is inserted as if I wanted to see the underlying tags (I don’t, I want to see formatted text). An example of what I see is:
<?xml version="1.0" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<pkg:package ....
What am I doing wrong?
Thanks,
Mark