For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
and:
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?1
I am using the following code that is claimed to work and is in production code
if (doc.Bookmarks.Exists(name))
{
Word.Bookmark bm = doc.Bookmarks[name];
Word.Range range = bm.Range.Duplicate;
bm.Range.Text = text; // Bookmark is deleted, range is collapsed
range.End = range.Start + text.Length; // Reset range bounds
doc.Bookmarks.Add(name, range); // Replace bookmark
}
The third line in the braces gives me error message in Catch as "The range cannot be deleted"
What am I doing wrong? Could someone show me code that works please
Hi,
This is the forum to discuss questions and feedback for Microsoft Word,the issue is more related to Word coding/programing, I recommend you post the question to the MSDN forum for Word
http://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev&filter=alltypes&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.
George ZhaoTechNet Community Support
George,
As indicated in my previous reply, the OP had already posted the same question in MSDN...
As for your reference to installing the Configuration Analyzer Tool (OffCAT), I can't see what that's got to do with anything under discussion.