Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2014, 05:08 AM
bigukfan bigukfan is offline Making Bold Using 'IF' Windows 8 Making Bold Using 'IF' Office 2010 32bit
Novice
Making Bold Using 'IF'
 
Join Date: Mar 2014
Location: England
Posts: 9
bigukfan is on a distinguished road
Default Making Bold Using 'IF'

I recently posted a question about making a font Red and Bold by the use if conditional formating in a mail merge. I did receive a useful reply from one user of this forum pointing out the issue was spaces. It was also suggested I could use an alternative syntax.

The original syntax with correct spaces is:

{IF {MAILMERGE HR}>80 {MAILMERGE HR} { MAILMERGE HR}}

Once I sorted out the correct spaces, this worked. However, using the exact syntax with the correct spaces it does not work for any other field. For example:

{IF {MAILMERGE QRS} >15 {MAILMERGE QRS} {MAILMERGE QRS}}

It was also suggested I could use the following syntax:

{={MERGEFIELD PR}>199 \#"'{MERGEFIELD PR}';'{MERGEFIELD PR}'"}

Using this syntax I do not get the error I was getting but I also do not get the bold if the value is greater than that quited.



Anybody have any ideas where I am going wrong? The mail merge is linked to an Excel file, Word 2010, Excel 2010, Windows 7 and Windows 8 PC used.

Thank you for any advice
Reply With Quote
  #2  
Old 03-10-2014, 05:31 AM
macropod's Avatar
macropod macropod is offline Making Bold Using 'IF' Windows 7 32bit Making Bold Using 'IF' 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

You have the wrong syntax for the second and third versions. See: https://www.msofficeforums.com/mail-...html#post60240
For the second version, the syntax is not '} >15' but '}> 15' or '} > 15'.
For the third version, the syntax is not '}>199' but '}- 199' or '} - 199'.

Word is very particular about the minimum space requirements.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-10-2014, 05:55 AM
bigukfan bigukfan is offline Making Bold Using 'IF' Windows 8 Making Bold Using 'IF' Office 2010 32bit
Novice
Making Bold Using 'IF'
 
Join Date: Mar 2014
Location: England
Posts: 9
bigukfan is on a distinguished road
Default

Once again macropod thank you for your help.

I agree, Word is very particular about spaces. I come from a programming environment working mainly in databases both large and small and spaces are not such an issue there!

I'll try not to waste any more of your time. Thank you.
Reply With Quote
  #4  
Old 03-10-2014, 02:11 PM
macropod's Avatar
macropod macropod is offline Making Bold Using 'IF' Windows 7 32bit Making Bold Using 'IF' 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

I'm sure your other programming environments would fail, too, if you used code like:
IF MyVar = XThenY
Most IDEs have the intelligence to insert the spaces either side of a mathematical operator for you, but can't handle errors such as with the lack of spaces either side of the 'Then' in the above. With Word field's you're the IDE.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Bold Using 'IF' Not Bold text but it comes up bold Pluviophile Word 7 10-22-2013 10:29 AM
Format Bold in one line makes all lines bold Nitte Word 2 02-07-2013 12:34 AM
Making Bold Using 'IF' Making Line Bold janith Word VBA 5 05-30-2012 04:04 PM
Making Bold Using 'IF' Making Multiple Words Bold mtk989 Word 2 06-25-2011 11:27 AM
Can't use Bold and Italic khmerguy Word 3 03-31-2011 12:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:18 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