I’m using the Replace method on a Range to identify text within a word document to be replaced. Part of the replacement is that I need to set the Font to bold and Underlined. I’m attempting to use the DocumentBuilder on the MatchNode and set the font settings from there, however my updates don’t seem to be effecting the resulting text. Can you please tell me the correct way to achieve this.
DocumentBuilder builder = new DocumentBuilder(e.MatchNode.Document);
builder.Font.Underline = Underline.Dash;
builder.Font.Bold = true;
e.Replacement = this.tag.Value;
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. I think, you can try using the same technique as demonstrated here:
Hope this helps.