![]() |
|
#1
|
||||
|
||||
![]()
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 |
#2
|
|||
|
|||
![]()
Thank you both for your support. It is very much appreciated when people unselfishly contribute their knowledge to help others.
GMayor ... your solution provided exactly what I was looking for. |
#3
|
|||
|
|||
![]()
Further to this request, based on this helpful solution, I am encountering an issue I hope can be easily overcome.
In my database, if a service is not required, the two times normally displayed are represented simply by hyphens. In this example posted, there are no services scheduled for sections 2 - 4. How can I eliminate that format and just leave those fields blank? ![]() image album upload The textual representation of the mergfield of the highlighted field is: { SET A { MERGEFIELD r2_srl \@"AM/PM" } }{ SET B { MERGEFIELD r2_sru \@"AM/PM" } }{ MERGEFIELD r2_srl \@"h:mm" }{ IF A = "AM" "A" "P" } - { MERGEFIELD r2_sru \@"h:mm" }{ IF B = "AM" "A" "P" } |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Highlander01 | Mail Merge | 3 | 01-19-2016 12:33 PM |
Time allotted minus time used with result in hour and minute | esther6086 | Excel | 2 | 04-29-2014 05:03 PM |
Formatting Merged Time Values Between Excel & Word | JennEx | Mail Merge | 1 | 07-12-2012 02:54 PM |
combined in-box for webmail accounts | sonoman | Outlook | 1 | 07-19-2011 02:50 PM |
word and excel combined | jasperman | Word | 1 | 08-23-2010 06:49 AM |