Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2017, 11:08 PM
gmayor's Avatar
gmayor gmayor is offline Odd Result In Combined Merged Time Fields Windows 10 Odd Result In Combined Merged Time Fields Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
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
  #2  
Old 04-24-2017, 06:37 PM
JennEx JennEx is offline Odd Result In Combined Merged Time Fields Windows XP Odd Result In Combined Merged Time Fields Office 2013
Competent Performer
Odd Result In Combined Merged Time Fields
 
Join Date: May 2010
Posts: 162
JennEx is on a distinguished road
Default Thank you!

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.
Reply With Quote
  #3  
Old 04-27-2017, 07:57 PM
JennEx JennEx is offline Odd Result In Combined Merged Time Fields Windows XP Odd Result In Combined Merged Time Fields Office 2013
Competent Performer
Odd Result In Combined Merged Time Fields
 
Join Date: May 2010
Posts: 162
JennEx is on a distinguished road
Default Adapting Mail Merge Field To Blank Out Empty Instances

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" }
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd Result In Combined Merged Time Fields Adding sequential Number in a document that already has merged fields inserted 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft