Free Support Forum -

Is it possible to change or update the mergefield names?

Here is my scenario. We have multiple clients that we export the documents to, whom use their own set of mergefields (such as crms).

I have a table with 3 fields (CompanyID, "OurMergeField", "TheirMergeField")

When a document is exported to the client, we want to update it with their preferred mergefields based on the CRM that they are using.

I believe that the mergefield.fieldname object only has get attributes. Is this true? What would be the best way to accomplish my goal?

1. Change the mergefield names (is this possible?)
2. Delete the current mergefields and replace them with new mergefields (i am guessing that this is definately possible)

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your interest I Aspose.Words.

Please take a look on this article in the documentation:

There is a technique to change names of merge fields. To take names from the table some code should be written to traverse it and find appropriate merge fields.

Let us know whether this fits your needs.


I am getting an error trying to view the page you pointed me to:

The specified request cannot be executed from current Application Pool

URL is

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Sorry, this page was renamed since I had given you the link.

The proper link is the following: