We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Appending Hyperlink to already existant Paragraph

Hello, is there any chance to add an hyperlink to a MergeField? I was trying using the MergeFieldEventHandler but I can't manage to add the hyperlink to the field, the closer I've came to was to append the hyperlink as additional text to the same paragraph as my MergeField...
e.g.

//Paragraph at word template.

Some text «sHyperlink» some text

//Paragraph after Merging

Some text *fieldvalue merged*  *additional text with my hyperlink* some text



what I really need is to get my hyperlink included in the field value merged.


5 Replies

SY Sethumanikkam Yogendran Syncfusion Team February 23, 2017 12:35 PM UTC

Hi Jorge,

Thank you for contacting Syncfusion support.

We have prepared the same to meet your requirement and in this sample, we have done the following things.

     1. Loaded existing Word document which contains merge field (named as “Hyperlink”).
     2. While performing Mail merge, added field value as Hyperlink using event handler.
     3. Saved as Word document.

Please find the below sample which illustrates the same, and let us know if this helps you
Sample link

Kindly refer our UG link to know more about working with Mail merge.

If we misunderstood any of your requirement, then kindly provide us sample or modified sample of above along with data’s used at your end and screenshot/output Word document of the expected result which will helpful to provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y



UN Unknown February 23, 2017 01:43 PM UTC

Thanks, it's actually what I was looking for...
One more thing, is there any way to format the hyperlink text to display?
It would be awesome to have something similar to CharacterFormat property for Hyperlink objects.


SY Sethumanikkam Yogendran Syncfusion Team February 24, 2017 01:46 PM UTC

Hi Jorge,

Thank you for your update.

We have modified the sample to meet your requirement and in this sample, we have applied some(CharacterFormat) formatting to hyperlink text to display.

Please find the sample from below link, and let us know if this helps you.
Sample link

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y



UN Unknown March 1, 2017 12:41 PM UTC

Using your sample I was able to accomplish what I needed.

Thanks a lot!


SY Sethumanikkam Yogendran Syncfusion Team March 2, 2017 04:04 AM UTC

Hi Jorge,

Thank you for your update.

We are happy to hear that the provided solution resolved your requirement. Please get back to us if you need any other assistance. We will be happy to assist you as always.

Regards,
Sethumanikkam.Y


Loader.
Up arrow icon