Hi
I’m having an issue trying to do the following with an application I’ve created using c#.Net 2010:
- I’ve got a document with a number of mergefields added to it.
- One of the fields is actually a website address (FieldName called Website), however, I have currently only added this as a normal mergefield which does not automatically convert into a hyperlink when I do a Document.MailMerge.Execute(DataRow);
What I’d like to find out is if there is a way to actually setup the mergefield in the word document to be a hyperlink.
ie. display www.google.co.za as a hyperlink when the report is generated.
And following on from that, is there a way to change what the display text is? ie. I’d like to set this to another mergefield if possible (FieldName called Name).
I’ve added a template eg. for you to see how I have added the mergefields and also what I’ve tried.
PS. The field may not always be filled in, in which case it needs to be suppressed (which my other mailmerge fields do automatically), and 2ndly, I’d need to be able to use both methods of display, so show the display text as the website address or the actual Name field. (I’ve thought of using the FieldMergeCallBack functions, but that would limit it only using one method).
Thank you.
Kind regards.
Kamla