We are testing a solution that replaces specific text in a Word document with hyperlinks. The text is in a table and each table cell contains a single paragraph.
We expected the following code to remove the text and add the hyperlink:
- Code: Select all
paragraph.Text = "";
paragraph.AppendHyperlink("url", "url", HyperlinkType.WebLink);
However, the result is normal text "url". No hyperlink!
If we remove paragraph.Text = ""; and simply append the hyperlink it works as expected but leaves the unwanted text.
Jim