Range.Text produces unexpected result for image

Hi there,

I am processing a document in a Word Add-In that I have written.  I find that a certain range, which as I found includes a certain image, results in a string with a forward slash character "/" when I print the range.text corresponding to that range.  When I delete the image, the "/" is no longer printed.

I cannot understand why this is happening and it is throwing off the character offsets that I am using.

Thanks for any answers you can provide.

foreach (Paragraph para in document.Paragraphs) {
      file.Write(para.Range.Text);
}
FYI I am using Word 2010, not 2013.


August 20th, 2015 6:44pm

Hi,

This is the forum to discuss questions and feedback for Microsoft Office 2013 and 365, I'll move your question to the MSDN forum for Word

https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev&filter=alltypes%2Calllanguages&sort=lastpostdesc

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

Regards,

Emi Zhang
TechNet Community Su

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 1:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics