Free Support Forum -

Insertion of MailMerge Fields


A requirement for the web app I am working on is for a template word document containing MailMerge fields to be displayed using our DB as the datasource.

I have this working fine using Aspose.Word…very neat - thanks.

However, the requirement also stipulates users should be able to create the template word documents via the web app. This would mean including the insertion of the MailMerge fields through the application. I am currently looking at either Aspose.TextBox or just a regular textarea and having the user inserting text to indicate this is where the MailMerge field will be e.g “{{Customer_Name}}”. I would then hope to use Aspose.Word to replace this with an actual MailMerge field.

Having looked through the API and played around with the demos, there doesn’t seem to be a “MoveToString” method after which I could then call MailMerge.InsertField. Alternatively, could I use Range.Replace() ?..although I don’t know what the replacement string would be to replicate the insertion of a MailMerge field.

Does Aspose.Word support this kind of functionality at present?


I’m afraid this is not possible at the moment. We certainly want this sort of functionality to be available too so it will be included in the next 1-2 months.

OK - thanks for your reply. I’ll keep an eye on these boards until then…