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 / April 2004

Tip: Looking for answers? Try searching our database.

Insert Word Field IF statements and dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles - 26 Mar 2004 06:13 GMT
How do I get the if statement to act on a date in a
mailmerge. I want to notify people with accounts more
than 90 days old. Using the Insert Word Field button on
the MailMerge toolbar I put IF: Date/Time  Greater Than
date()-90 . Is this the correct way to enter this? What
is the proper way to do this?
Graham Mayor - 26 Mar 2004 07:21 GMT
See the section on date calculations at
http://www.gmayor.com/formatting_word_fields.htm

Signature

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

     Web site www.gmayor.com
 Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>

> How do I get the if statement to act on a date in a
> mailmerge. I want to notify people with accounts more
> than 90 days old. Using the Insert Word Field button on
> the MailMerge toolbar I put IF: Date/Time  Greater Than
> date()-90 . Is this the correct way to enter this? What
> is the proper way to do this?
macropod - 26 Mar 2004 07:57 GMT
Hi Charles,

Go to:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
(url all one line)
Where you can download a Word document for doing date calculations using
Word fields instead of vba.

For this case, you'd convert both today's date and the account date to
Julian day numbers and compare the difference.

Cheers

> How do I get the if statement to act on a date in a
> mailmerge. I want to notify people with accounts more
> than 90 days old. Using the Insert Word Field button on
> the MailMerge toolbar I put IF: Date/Time  Greater Than
> date()-90 . Is this the correct way to enter this? What
> is the proper way to do this?
macropod - 26 Mar 2004 10:35 GMT
PS: One of the examples in the document shows how to calculate the # days
difference between two dates. Using your IF tests to compare the result to
>90 will give you all you need to do the rest.

> Hi Charles,
>
[quoted text clipped - 20 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
rlampky - 04 Apr 2004 23:38 GMT
Using a multipage document and entering a date field such as the many
examples shown on the WOPR site. How would one write the IF statement to
respond if the day is friday or saturday to autotext insert a newpage in the
document at the end of the current document?

How would you write the if statement to cause a document ins
> PS: One of the examples in the document shows how to calculate the # days
> difference between two dates. Using your IF tests to compare the result to
[quoted text clipped - 29 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
Graham Mayor - 05 Apr 2004 07:53 GMT
{IF {Date \@ "dddd"} = Friday "insert a page break here" "{IF {Date \@
"dddd"} = Saturday "insert a page break here"}" ""}
should do the trick. Insert the page break where indicated within the field.
If the test is for a the result of a merge field change the Date fields to
the Merge field.

Signature

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

     Web site www.gmayor.com
 Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>

> Using a multipage document and entering a date field such as the many
> examples shown on the WOPR site. How would one write the IF statement
[quoted text clipped - 36 lines]
>> Checked by AVG anti-virus system (http://www.grisoft.com).
>> Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
rlampky - 05 Apr 2004 14:30 GMT
Very appreciative thank you.

> {IF {Date \@ "dddd"} = Friday "insert a page break here" "{IF {Date \@
> "dddd"} = Saturday "insert a page break here"}" ""}
[quoted text clipped - 16 lines]
> >>>
> >>> Go to:

http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
> >>> (url all one line)
> >>> Where you can download a Word document for doing date calculations
[quoted text clipped - 21 lines]
> >> Checked by AVG anti-virus system (http://www.grisoft.com).
> >> Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
macropod - 11 Apr 2004 20:16 GMT
Hi Graham,

One could also automate the page-break insertion with:
{QUOTE{IF{DATE \@ dddd}= Friday {QUOTE 12}}{IF{DATE \@ dddd}= Saturday
{QUOTE 12}}}

Cheers

> {IF {Date \@ "dddd"} = Friday "insert a page break here" "{IF {Date \@
> "dddd"} = Saturday "insert a page break here"}" ""}
[quoted text clipped - 16 lines]
> >>>
> >>> Go to:

http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
> >>> (url all one line)
> >>> Where you can download a Word document for doing date calculations
[quoted text clipped - 21 lines]
> >> Checked by AVG anti-virus system (http://www.grisoft.com).
> >> Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
 
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.