I want to calculate a date 1 year ahead of a date in a bookmark

T

Terry Kinnard

I want to be able to calculate a new date 1 year ahead of a date that is
stored or entered in a bookmark so that if the value under the bookm ark
changes the calculated date value will also change. In Excel I can easily do
date calculation but if it's available in Word help is NO help.
 
S

Steve Yandl

Terry,

See if something like this would work.

Sub DateReCalc()
Dim strOldDate As String
Dim dteNewDate As Date

strOldDate = ActiveDocument.Bookmarks("origDate").Range.Text
dteNewDate = DateAdd("yyyy", 1, DateValue(strOldDate))

MsgBox dteNewDate

End Sub

Steve Yandl
 

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