Formatting Management Suite Dates for Microsoft Word Mail Merge

Maxwell Systems Management Suite (MSMS) has the ability to use “templates” to create documents, such as a Subcontract, via Microsoft Word mail merge. But when a date is required in the output, Maxwell exports that date as a string in the format of YYYYYMMDD (today would be 20091230), and unfortunately, Microsoft Word doesn’t see that as a date, and doesn’t allow you to format the date in the document correctly.

After doing a little detective work, I found that I could change the date format of the data Maxwell exports to Word. By changing the Date Format so that the date was exported as 12/30/2009, Word then allowed the date to be formatted correctly. Ultimately I had to add this line of code to CSCWMA to make the dates display properly in the merge document:

29701 LET CSCON2$[7]="04" ! force Date Format 04 MM/DD/YY for better mail merge dates

With this fix in place, in the Microsoft Word ‘template’ document, the date can be formatted in a number of ways including something like this:

{MERGEFIELD "SB1_Contract_Date" \@"MMMM d, yyyy"}

That would make the date appear as December 30, 2009.