Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2014, 03:38 PM
bigukfan bigukfan is offline Using IF to make bold Windows 8 Using IF to make bold Office 2010 32bit
Novice
Using IF to make bold
 
Join Date: Mar 2014
Location: England
Posts: 9
bigukfan is on a distinguished road
Default Using IF to make bold

I am new to MERGEFIELD in MailMerge. I am trying to use an If statement to say that if the patient's heart rate is above 80 then make the heart rate Red and bold, otherwise make the heart rate black and not bold. The MailMerge field is called HR.I use the Ctrl and F9 to insert { brackets. The Word doc uses an Excel spreadsheet as its data source.

The syntax I have played about with is:



{If {MERGEFIELD HR}>80{MERGEFIELD HR} {MERGEFIELD HR}}

However despite various versions of the syntax II keep getting the error message:

Error! Unknown op code for conditional.

The mergefield is in the cell of a table, although I can't see this has any effect

What am I doing wrong? Thanks for any help.
Reply With Quote
  #2  
Old 03-06-2014, 06:09 PM
macropod's Avatar
macropod macropod is offline Using IF to make bold Windows 7 32bit Using IF to make bold 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

The basic issue is a missing spaces. The minimum requirement is:
{IF{MERGEFIELD HR}> 80 {MERGEFIELD HR} {MERGEFIELD HR}}
You could also use:
{={MERGEFIELD HR}-80 \# "'{MERGEFIELD HR}';'{MERGEFIELD HR}'"}

Note: The field brace pairs (ie '{ }') for the above examples are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-07-2014, 01:54 AM
bigukfan bigukfan is offline Using IF to make bold Windows 8 Using IF to make bold Office 2010 32bit
Novice
Using IF to make bold
 
Join Date: Mar 2014
Location: England
Posts: 9
bigukfan is on a distinguished road
Default Thanks

Thank you for your help. It now works just fine and dandy.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Format Bold in one line makes all lines bold Nitte Word 2 02-07-2013 12:34 AM
Using IF to make bold How to I make text Bold in a User Form -Visual Basic gurp99 Word VBA 11 03-12-2012 04:05 PM
Using IF to make bold Using replace to make a word bold and its proceeding character. bostonboi Word 1 01-16-2011 01:54 PM
Using IF to make bold How to make a list of all the bold words in a document? galaxy_110 Word 1 12-31-2010 08:23 AM
Using IF to make bold Autocorrect to make words Bold? GB89 Word 1 04-15-2010 09:04 PM

Other Forums: Access Forums

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