We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word Mail Merge Fields to PDF Fields

This was discussed in post #264142. I’m wondering if there is an enhancement on the horizon to convert Mail Merge fields to PDF fields. If not, is there a way we could request such an enhancement? Otherwise, how could we convert Mail Merge fields to Form Fields in Word? Thanks!

Hi Janice,

Thanks for your inquiry.

jackhenry:

This was discussed in post #264142.

Could you please share the complete forum thread link?
jackhenry:

I’m wondering if there is an enhancement on the horizon to convert Mail Merge fields to PDF fields. If not, is there a way we could request such an enhancement? Otherwise, how could we convert Mail Merge fields to Form Fields in Word?

It would be great if you please share some more detail about your query. We will then provide you more information about your query along with code.

We perform Document.MailMerge.Execute() and then perform Document.Save() with save options to be SaveFormat.Pdf. We want our users to be able to modify the data in the resulting PDF document that originated as the mail merge data.


Currently, using Word, when you perform a mail merge, the resulting mail merge information in the Word document can be modified. Using Aspose, however, the resulting mail merge information is created as plain text. This seems like a limitation when creating PDFs from Word mail merge documents.

We are wondering if there are any plans to allow the creation of PDF form fields for the Word mail merge fields so that users can modify the mail merge data in the PDF.

Hi Janice,

Thanks for your inquiry. In your case, we suggest you following solution.

1) Implement IFieldMergingCallback interface.
2) In IFieldMergingCallback.FieldMerging, move the cursor to the mail merge field and insert text form field.
3) Use PdfSaveOptions.PreserveFormFields to preserve Microsoft Word form fields as form fields in PDF

Hope this helps you. Please let us know if you have any more queries.