Share via

Problems with Mergefield Time format

Anonymous
2022-12-12T18:27:05+00:00

I am formatting times merged into Word from Excel using MERGEFIELD FINAL_START @ “h:mm AM\PM” For some reason, rather than returning either "AM" or "PM", it is returning "A12P12" for all records. Does anyone know why?

Microsoft 365 and Office | Word | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Paul Edstein 82,861 Reputation points Volunteer Moderator
2022-12-12T21:18:20+00:00

Your problem is caused by the use of AM\PM instead of am/pm in the switch. Word interprets the combination of \ and M as a month switch.

Hence, you should have:

MERGEFIELD FINAL_START @ "h:mm am/pm

See Mailmerge Time Formatting in the Mailmerge Tips & Tricks page at: Mailmerge Tips & Tricks (msofficeforums.com)

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-12-12T22:42:24+00:00

    Figured it out. If I copy in the field codes it does not work. If I manually type in the field codes, it works just fine. Go Figure!!!!

    Was this answer helpful?

    0 comments No comments
  2. Charles Kenyon 167.8K Reputation points Volunteer Moderator
    2022-12-12T18:51:33+00:00

    If your first (Date) refers to the same field in Excel, try adding the time to it.

    I.e.,

    { Mergefield FINALSTART \@ "dddd, MMMM dd, yyyy at h:mm AM\PM" }
    

    The interface between Word formatting and Excel formatting can be tricky.

    For more help with this, consider posting links to both an Excel file and the mail merge primary file here. They can be modified to remove confidential information but should demonstrate the problem.

    Why a sample file is important for troubleshooting - - - - - - - and how to do it.

    I do not know that the following will help, but they might.

    Was this answer helpful?

    0 comments No comments