chrisfcarroll / MailMerge

Merge component for OfficeOpenXml .docx (i.e. Microsoft Word) documents
GNU General Public License v3.0
19 stars 7 forks source link

Case sensitivity #4

Closed AllTaken closed 3 years ago

AllTaken commented 3 years ago

Merge fields appear to be case sensitive, when performing a merge using this library. Merge fields are not usually case sensitive, when merging using Microsoft Word.

Would it be possible to change this behavior, or at least make it configurable?

chrisfcarroll commented 3 years ago

It would! You could do a pull request or I can get to it in a couple of days, later this week.

No configuration is needed - both Word and the ECMA standard agree that :

The names of fields are alphabetic tokens [Example: Some field-type names are ASK, COMMENTS, NEXT, and SET. end example]. These tokens are called field-type names. Field-type names are case-insensitive. [Example: The field-type names DATE, Date, dAtE, and date are equivalent. end example]

AllTaken commented 3 years ago

I'll try to cook up a reasonable PR. Thank you.

AllTaken commented 3 years ago

PR #5 should fix this.

chrisfcarroll commented 3 years ago

Done in https://www.nuget.org/packages/MailMerge/2.4.0