Adding dynamic DateDiff field to document

A

ajkessel

Using Word 2002, is there any way to add a field that gives the
remaining days to a certain date? It does not appear that DateDiff()
is a valid function for a formula in an inserted field. Right now, I
have a very short VBA macro that does this:

Selection.InsertAfter " -" & DateDiff("d", Now(), Selection)

The problem is that I have to highlight the date and re-execute the
macro every day to update the remaining days. What I want is to insert
a calculated field such that it always shows the number of days between
a given date and now(). I will have several of such fields throughout
the document, and it would be nice if it were easy to add additional
dates on an ongoing basis.

Is there any way to do this?
 

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