Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2007

Tip: Looking for answers? Try searching our database.

Conditional Formatting?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JethroUK© - 13 Oct 2007 15:36 GMT
I am using excel as a datasource and merging this to create some
appointments for some students

{MERGEFIELD "CSCS_Test_DateTime"}

I need to make the appointments pending very distinct from the history (in
RED maybe?)

Any way i can do this?

{IF {Mergefield "CSCS_Test_DateTime"} > Now()
macropod - 14 Oct 2007 02:36 GMT
Hi Jethro,

Try:
{IF{MERGEFIELD "CSCS_Test_DateTime" \@ YYYYMMDD}> {DATE \@ YYYYMMDD} {MERGEFIELD "CSCS_Test_DateTime" \@ "d MMM YYYY" \*Charformat}
{MERGEFIELD "CSCS_Test_DateTime"  \@ "d MMM YYYY" \*Charformat}}
where you format the 'M' in the last two occurrences of 'MERGEFIELD' as you want the output to appear. Change the "d MMM YYYY"
strings to match your preferred date format (eg "dddd, d MMM YYYY", "d/M/YY", etc)

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

>I am using excel as a datasource and merging this to create some appointments for some students
>
[quoted text clipped - 5 lines]
>
> {IF {Mergefield "CSCS_Test_DateTime"} > Now()
JethroUK© - 14 Oct 2007 10:46 GMT
Hi

Thanks for that - I tried copy/pasting but i don't think i'm doing right -
it just stays as plain text - it doesn't even have the right-click menu for
fields: Update, Edit Toggle field codes

I've even tried pasting each parameter into the 'IF' wizard seperately

> Hi Jethro,
>
[quoted text clipped - 18 lines]
>>
>> {IF {Mergefield "CSCS_Test_DateTime"} > Now()
Graham Mayor - 14 Oct 2007 10:49 GMT
See your other thread - you cannot copy/paste fields.
You must use CTRL+F9 for each set of fields brackets.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Hi
>
[quoted text clipped - 30 lines]
>>>
>>> {IF {Mergefield "CSCS_Test_DateTime"} > Now()
macropod - 14 Oct 2007 21:53 GMT
As Graham says, you can't simply copy & paste - you have to use proper field braces (ie '{ }'), which you insert in pairs via
Ctrl-F9. And be careful to keep the same spacing. In:
{IF{MERGEFIELD "CSCS_Test_DateTime" \@ YYYYMMDD}> {DATE \@ YYYYMMDD}
> {MERGEFIELD "CSCS_Test_DateTime" \@ "d MMM YYYY" \*Charformat} {MERGEFIELD "CSCS_Test_DateTime"  \@ "d MMM YYYY" \*Charformat}}
make sure to delete the line feeds and '> ' character strings, so that there is a single space separating the fields.

Probably the easiest way to set the field up is to:
1. insert three copies of your basic mergefield, thus:
«CSCS_Test_DateTime» «CSCS_Test_DateTime» «CSCS_Test_DateTime»
2. Select each field in turn, press Shift-F9 to expose its code and edit it as shown above, adding the formatting as originally
described, then pressing F9 to update the field before moving on to the next one
3. Insert a DATE field between the first pair of mergefields, via Ctrl-F9 to create a pair of field braces, then typing 'DATE' thus:
«CSCS_Test_DateTime» {DATE} «CSCS_Test_DateTime» «CSCS_Test_DateTime»
4. Select all the fields and press Ctrl-F9 to wrap all of them in a single field, thus:
{«CSCS_Test_DateTime» {DATE} «CSCS_Test_DateTime» «CSCS_Test_DateTime»}
5. Add the IF test, making sure to preserve the inter-field spacing, thus:
{IF«CSCS_Test_DateTime»>{DATE} «CSCS_Test_DateTime» «CSCS_Test_DateTime»}
Note that there are two spaces.
6. Select the whole lot and press F9 to update.
7. Run your mailmerge.

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

> Hi
>
[quoted text clipped - 21 lines]
>>>
>>> {IF {Mergefield "CSCS_Test_DateTime"} > Now()
JethroUK© - 14 Oct 2007 23:47 GMT
It's working now - I only used CTRL F9 to create the outer pair and I
'still' didn't realise I had to use CTRL F9 to create all (5) pairs

Thanks

> As Graham says, you can't simply copy & paste - you have to use proper
> field braces (ie '{ }'), which you insert in pairs via Ctrl-F9. And be
[quoted text clipped - 54 lines]
>>>>
>>>> {IF {Mergefield "CSCS_Test_DateTime"} > Now()
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.