Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
webXpeerience
 
Posts: n/a
Default Performing Date calculations in Word

I'm setting up a mail merge document. I need to be able to check if one date
is greater than or equal to 14 days and if so insert a certain piece of text
into the document. I've tried to set up a procedure called CheckDate and
then use DateDiff to calculate the number of dates but I can't get it to run.
Can anyone help?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default Performing Date calculations in Word

Is your problem within the procedure, or getting the procedure to run?

It's not easy to run macros within the context of a mailmerge. Another
approach is to put the calculation within the MailMerge query itself --
IIF([DateField 1] = [DateField 2] + 14), "Text if yes", "Text if no"), ...





"webXpeerience" wrote in message
...
I'm setting up a mail merge document. I need to be able to check if one
date
is greater than or equal to 14 days and if so insert a certain piece of
text
into the document. I've tried to set up a procedure called CheckDate and
then use DateDiff to calculate the number of dates but I can't get it to
run.
Can anyone help?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Performing Date calculations in Word

The field calculations required to do this in the Word document are
complex - see the linked article at
http://www.gmayor.com/insert_a_date_...than_today.htm

--

Graham Mayor - Word MVP

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


webXpeerience wrote:
I'm setting up a mail merge document. I need to be able to check if
one date is greater than or equal to 14 days and if so insert a
certain piece of text into the document. I've tried to set up a
procedure called CheckDate and then use DateDiff to calculate the
number of dates but I can't get it to run. Can anyone help?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
How do I "reveal codes" in Word the way I could in Word Perfect? crystal Microsoft Word Help 3 May 11th 06 02:10 AM
hard space between words. Sandy L Microsoft Word Help 7 May 5th 06 08:25 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Does Word have a QuickCorrect/Quick Word option like WordPerfect? CW New Users 2 December 20th 05 05:54 PM


All times are GMT +1. The time now is 11:08 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"