Trying to replace sdtelement with html with href(w:hyperlink) doesn't work

Jenifer Rajendren 6 Reputation points
2021-03-29T21:24:07.47+00:00

Hi There, I am using Openxml to update/replace word/docx with html content.
The content to be replaced is paragraph with href or external hyperlink on it.

> Sample html input:

<html> Hi<a href="www.google.com">Hello</a> </html>

I had attached a file which has the code that does the replacement,not sure what is wrong.It simply doesn't work on the target .docx file.

82543-writereplacehtmlfunc.txtAny thoughts? Thanks

Note:I tried copying the code,it was not in readable mode.Thereby attaching a file that contains a function.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,228 questions
{count} votes