Function - Increase date by 14 days??

  • Thread starter Thread starter James
  • Start date Start date
J

James

I have a word document (invoice) that mail merges in an
Invoice Date.

However I would love to be able to create another field
called PAYMENT DATE. Which would be the Invoice Date + 14
days.

Is there a function I can use to create such a date???

Regards

James Terrington
 
Hi James

You could write a little macro such as:

Sub AdvanceDate()
Dim FirstDate As Date ' Declare variables.
Dim IntervalType, PayDate As String
Dim Number As Integer
FirstDate = Date ' uses today's date
IntervalType = "d" ' "d" specifies days as interval.
Number = 14 ' the number of days to advance
PayDate = DateAdd(IntervalType, Number, FirstDate)
End Sub

and then further refine it to insert it in the .doc

John
 
Back
Top