How to manipulate date in MS Word

How to manipulate dates in MS Word.

If you want to calculate end date, date difference and other date function, you don’t have an option but to go for VBA. Unlike Excel, Word does not have any date functions.

This video shows a simple macro to do the date math..

Any questions, suggestions ? please comment below

Subscribe to my channel:
YouTube Channel:
My Blog:…

4 thoughts on “How to manipulate date in MS Word

  1. I'm getting the FormatDate error also?

    Sub Macro1()
    Dim aDate As String
    Dim endDate1 As Date
    aDate = ActiveDocument.Bookmarks("TodayDate").Range.Text
    FormatDate = CDate(aDate)
    endDate1 = DateAdd("d", 1, FormatDate)
    ActiveDocument.Bookmarks("EndDate1").Range.Text = endDate1
    End Sub

    When you hover over the "FormatDate" it says "FormatDate=Empty". I've tried changing my format on the "TodayDate" date field with no luck. Not sure what I'm not doing right 🙁 Would like to figure this out.

  2. I'm getting an error from the last 2 lines of code ,,,,
    Dim aDate As String
    Dim endDate As Date
    aDate = ActiveDocument.Bookmarks("date").Range.Text
    FormatDate = CDate(aDate)
    endDate2 = DateAdd("m".1, FormatDate)
    endDate3 = DateAdd("m".1, FormatDate)
    ActiveDocument.Bookmaks("date2").Range.Text = endDate2
    ActiveDocument.Bookmaks("date3").Range.Text = endDate3

Leave a Reply

Your email address will not be published. Required fields are marked *