How to Add Hyperlinks

Mar 13, 2012 at 11:21 AM


I have added a new rich text contentControl (CC1) to the Template3.docx

I am using the GenerateDocumentUsingDocWithTableAndChartsGenerator() method to populate CC1. The value for the CC1 is being passed through GetDataContext(). 

The content control is non recursive and I am using the method NonRecursivePlaceholderFound(string placeholderTag, OpenXmlElementDataContext openXmlElementDataContext) to pass the value for the content control.

Now the question, 

I would like CC1 to be a hyperlink. All i see is an option to pass tagValue and content, how do I associate the url and text ?

A code sample would be very helpful.