View Single Post
 
Old 04-22-2017, 11:08 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,143
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You cannot use only part of a field nor make up your own switches, so with a bit of lateral thinking the following construction should work

{ SET A { MERGEFIELD r1_srl \@"AM/PM" } }{ SET B { MERGEFIELD r1_rsu \@"AM/PM" } }{ MERGEFIELD r1_srl \@"h:mm" }{ IF A = "AM" "A" "P" } - { MERGEFIELD r1_rsu \@"h:mm" }{ IF B = "AM" "A" "P" }


You might find it simpler to use http://www.gmayor.com/export_field.htm to convert the text string above to working fields.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote