Hi. I am receiving some odd behaviour from the following line of code in my application -
string[] arrFields = objMailMergeDocument.MailMerge.GetFieldNames();
It appears as if merge codes which contain comlpex date formatting in the merge code do not get picked up correctly. They are being resolved as ‘’ (empty string) as Asposed to the correct name.
The merge codes it is having trouble with are -
{MERGEFIELD \@ "dddd" "ASSETS_DATE07" }
{MERGEFIELD \@ "d" \* Ordinal "ASSETS_DATE07"}
{MERGEFIELD \@ "MMMMyyyy" "ASSETS_DATE07"}
In this example, ASSETS_DATE07 is a datetime field returned from a database. The overall goal is the have the date formatted to something like ‘Friday the 8th of February 2008’ (hence the same code merged 3 times with different formatting). Is there a better way to handle this in the document or am i using the method incorrectly?
Any assistance would be greatly appreciated. Thanks in advance.