Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Newuser
 
Posts: n/a
Default Select record to print by compare the date ...

How do I select the records to print by compare the date in the Mailmerge
table ? I need to print those records if the field of the date (in yyyymmdd
format) is over 30 days from todays date. Thanks ....
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Select record to print by compare the date ...

What version of Word? What is the data source?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Newuser" wrote in message
...
How do I select the records to print by compare the date in the Mailmerge
table ? I need to print those records if the field of the date (in
yyyymmdd
format) is over 30 days from todays date. Thanks ....



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Newuser
 
Posts: n/a
Default Select record to print by compare the date ...

My word's version is 2003 and the data source is created by word too ....

"Doug Robbins - Word MVP" wrote:

What version of Word? What is the data source?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Newuser" wrote in message
...
How do I select the records to print by compare the date in the Mailmerge
table ? I need to print those records if the field of the date (in
yyyymmdd
format) is over 30 days from todays date. Thanks ....




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Select record to print by compare the date ...

This is going to be quite tricky to achieve and the solution is based on
work by Macropod (linked from my web site -
http://www.gmayor.com/insert_a_date_...than_today.htm )

You can use a SKIPIF field to eliminate all records that don't fit the
criteria by adding a complex field structure to your document: Copy the code
from the link and edit it to match that below - that way you will not make
as many mistakes

{ SET DueDate {QUOTE {SET Delay 30}{SET a{=INT((14-{DATE \@ M})/12)}}{SET
b{={DATE \@ yyyy}+4800-a}}{SET c{={DATE \@ M}+12*a-3}}{SET d{DATE \@ d}}{SET
jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}}{SET
e{=INT((4*(jd+32044)+3)/146097)}}{SET f{=jd+32044-INT(146097*e/4)}}{SET
g{=INT((4*f+3)/1461)}}{SET h{=f-INT(1461*g/4)}}{SET
i{=INT((5*h+2)/153)}}{SET dd{=h-INT((153*i+2)/5)+1}}{SET
mm{=i+3-12*INT(i/10)}}{SET yy{=100*e+g-4800+INT(i/10)}}{=dd*10^6+mm*10^4+yy
\# "00'-'00'-'0000"} \@ "yyyyMMdd"} }{ SKIPIF { MERGEFIELD Datefield \@
"yyyyMMdd" } { DueDate } }

Put the name of your date field in the last line in place of 'Datefield'

--

Graham Mayor - Word MVP

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



Newuser wrote:
My word's version is 2003 and the data source is created by word too
....

"Doug Robbins - Word MVP" wrote:

What version of Word? What is the data source?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Newuser" wrote in message
...
How do I select the records to print by compare the date in the
Mailmerge table ? I need to print those records if the field of
the date (in yyyymmdd
format) is over 30 days from todays date. Thanks ....



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
Automatic date change bogiebob Microsoft Word Help 9 October 25th 07 06:22 AM
Concerning Current Date Changes On Past Documents smartasien Microsoft Word Help 2 May 2nd 06 03:31 PM
How can I select a different printer to print a Word document BobW Microsoft Word Help 1 April 28th 06 07:15 PM
Document Creation Date Thomas M Microsoft Word Help 3 October 29th 05 04:02 AM
how to I print a form with 1 day and date per page day and date Page Layout 2 May 22nd 05 07:31 AM


All times are GMT +1. The time now is 12:59 AM.

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"