inserting future date in date code

S

sdasaro

HI
I send form letters using mail merge. I want to indicate an expiration date 21 days after the date the letters are printed. I don't have a clue as to how to do this and have been referring to "offer expires 21 days after todays datewhich is inserted as a date field. This is unprofessional and makes my ears red. Please help
Thank
Stephe
 
C

Charles Kenyon

This is more complex than you might imagine, but it can be done. See <URL:
http://addbalance.com/word/datefields2.htm> for information on the different
kinds of ways to make a date calculation work. It includes links to pages
with fields and an explanation of different macros that can be used instead
of fields.

--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

sdasaro said:
HI,
I send form letters using mail merge. I want to indicate an expiration
date 21 days after the date the letters are printed. I don't have a clue as
to how to do this and have been referring to "offer expires 21 days after
todays datewhich is inserted as a date field. This is unprofessional and
makes my ears red. Please help.
 
J

Jezebel

Method 1: If your mailmerge is based on an SQL query, add a field something
like this ...

SELECT .... (Now() + 21) As F_Date ....

Then use F_Date mergefield as your future date.


Method 2: In the template on which the form letter is based, add a macro
call AutoNew that includes this line:

ActiveDocument.CustomDocumentProperties.Add Name:=F_Date,
LinkToContent:=False, Type:=msoPropertyTypeDate, Value:=Now+21

Then use a { DocProperty F_Date } field in your document.




sdasaro said:
HI,
I send form letters using mail merge. I want to indicate an expiration
date 21 days after the date the letters are printed. I don't have a clue as
to how to do this and have been referring to "offer expires 21 days after
todays datewhich is inserted as a date field. This is unprofessional and
makes my ears red. Please help.
 
M

macropod

Hi Stephen,

You can download a Word document that uses fields to do this, and more, with
dates at:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=249902
(url all one line)

If you want/need to use a macro, check out the vba DateAdd function.

Cheers


sdasaro said:
HI,
I send form letters using mail merge. I want to indicate an expiration
date 21 days after the date the letters are printed. I don't have a clue as
to how to do this and have been referring to "offer expires 21 days after
todays datewhich is inserted as a date field. This is unprofessional and
makes my ears red. Please help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top