insert a future date in document based on current date

B

bpj

I'm trying to get a document to automatically generate a date in the future
using the current date as a basis.

Thought of using the VB DateAdd function with DateAdd ("d", 3, Date) and get
a compilation error.

Anyone know what I'm doing wrong?
 
D

Doug Robbins

MsgBox DateAdd("d", 3, Date)

works fine here. Maybe it's something else in your code.
--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
C

Charles Kenyon

This is more complex than you might imagine, but it can be done. See
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.
 

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