Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2014, 05:41 AM
bigukfan bigukfan is offline Can I Use Two Formatting Elements In The Same Field Windows 8 Can I Use Two Formatting Elements In The Same Field Office 2010 32bit
Novice
Can I Use Two Formatting Elements In The Same Field
 
Join Date: Mar 2014
Location: England
Posts: 9
bigukfan is on a distinguished road
Smile Can I Use Two Formatting Elements In The Same Field

I have a mailmerge document using an Excel spreadsheet. In one field called LVMass (a number) I wish to do two things at the same time. Both can be done separately (and the examples below both work), but the question is can I combine both at the same time?



1. Format the number to two decimal places using:

\# "0.00"

2. Set to bold if outside a range:

{={MERGEFIELD LVMass}-201 \#"'{MERGEFIELD LVMass}';'{MERGEFIELD LVMass}'"}

I have tried various ways to combine these without success. Is this possible?

Thank you for any advice you can give.
Reply With Quote
  #2  
Old 06-03-2014, 01:35 PM
ScottA ScottA is offline Can I Use Two Formatting Elements In The Same Field Windows 7 64bit Can I Use Two Formatting Elements In The Same Field Office 2010 32bit
Advanced Beginner
 
Join Date: Apr 2014
Posts: 30
ScottA is on a distinguished road
Default

bigukfan -

Give this a shot... Works for me in my document anyway. Had to read between the lines a bit so hope I interpreted what you need correctly.

Assuming that you want to format all values as 2 digit decimal - Then
to bold any LVMass value that is less than 200.

{if {condition } < 200 {true_result} {false_result}}

The formula would be:



{if {MERGEFIELD LVMass} < 200 {MERGEFIELD LVMass \# "0.00"} {MERGEFIELD LVMass \# "0.00"}}

Note that you have to put the picture switch in for both the true and false
results to have all the values display with decimals. Also note that you have to insert the curly brackets - {} - using CTRL-F9 key combination. You can't just type them in.

The bold formatting was applied after the whole formula was input using the bold key (CTRL-b)

Hope that is what you needed!

Scott

Last edited by ScottA; 06-03-2014 at 05:39 PM.
Reply With Quote
  #3  
Old 06-04-2014, 04:07 AM
bigukfan bigukfan is offline Can I Use Two Formatting Elements In The Same Field Windows 8 Can I Use Two Formatting Elements In The Same Field Office 2010 32bit
Novice
Can I Use Two Formatting Elements In The Same Field
 
Join Date: Mar 2014
Location: England
Posts: 9
bigukfan is on a distinguished road
Default Thanks

Thanks for your help ScottA, some very useful comments from you.

In further research it turns out formatting in Excel can be preserved in Word by connecting using DDE, which is a whole lot less hastle! A couple of clicks to specify DDE in Word and the rounding problem is not a problem anymore.

More than one way to skin a cat as usual. Once again, thank you for your comments.
Reply With Quote
  #4  
Old 06-04-2014, 03:42 PM
macropod's Avatar
macropod macropod is offline Can I Use Two Formatting Elements In The Same Field Windows 7 32bit Can I Use Two Formatting Elements In The Same Field Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi bigUKfan,

Although DDE can preserve formatting, it's also a whole lot less capable than the default OLE DB provider Word 2002 & later use. For starters, with an Excel data source, it only works with the first worksheet and won't accept named ranges. The use of field switches also means your mailmerge output can be independent of the data format. Without that, you'd need have separate fields in the data source for every data format you wanted to use.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I Use Two Formatting Elements In The Same Field Setting formatting for field with email hyperlink JenK Excel 2 02-13-2014 10:38 PM
Can I Use Two Formatting Elements In The Same Field Merge Field Formatting Welshie82 Mail Merge 4 10-08-2012 03:38 AM
Text form field loses formatting in Word 2010 mel72349 Word 0 08-02-2011 02:25 PM
Sorting elements in a row Riccardo Excel 2 12-14-2010 10:08 AM
Can I Use Two Formatting Elements In The Same Field Text Form Field formatting problem Toshii Word 1 06-08-2009 07:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:13 AM.


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