Mail Merge fields using Format specifier

Hi,

I've been successfully been using Mail Merge functionality with Format specifier for dates, but this has recently stopped working and not apply any formatting for date values.

I use a word merge field like this:  { MERGEFIELD report.entryDate \@ "dd MMMM yyyy" \* MERGEFORMAT }

(This is what it looks like when I toggle the field codes for the MergeField inside of Word.)

I've been sending the value as a string representation in the format of "yyyy-MM-dd" eg 2024-10-02 for the the 2 Oct 2024.

I use the method to run the word merge > document.MailMerge.Execute(fieldNames, fieldValues)

Thanks for your assistance.


1 Reply

DS Dharanya Sakthivel Syncfusion Team November 29, 2024 10:54 AM UTC

Hi Anthony,

Based on the information provided, the issue appears to be related to the date format specifier not being applied correctly during the mail merge process. We have prepared a sample to demonstrate how to perform a mail merge with the desired date format.

To get the result as
“2 Oct 2024”, you need to use the format specifier \@ "d MMM yyyy". Kindly refer to the attached sample along with the template and result document in the Data folder for your reference.

Result,
Dharanya.


Attachment: MailmergeDate_3c96f623.zip

Loader.
Up arrow icon