Hi Daria11,
Yes calculating dates is complex if you need to do it with field coding. To see how to do just about everything you might want to do with date calculations in Word, check out my Microsoft Word Date Calculation Tutorial, at:
http://lounge.windowssecrets.com/ind...owtopic=249902
or
http://www.gmayor.com/downloads.htm#Third_party
Do read the document's introductory material.
However, for what you've descibed, date calculation isn't much of an issue. Try the following macro:
Code:
Sub DateUpdater()
Application.ScreenUpdating = False
Dim FRDoc As Document, FRList As String, j As Long
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.MatchWholeWord = True
.MatchCase = True
.Text = "+Today"
.Replacement.Text = Format(Date, "dddd, d MMMM, YYYY")
.Execute Replace:=wdReplaceAll
.Text = "+1week"
.Replacement.Text = Format(DateAdd("d", 7, Date), "dddd, d MMMM, YYYY")
.Execute Replace:=wdReplaceAll
.Text = "+2weeks"
.Replacement.Text = Format(DateAdd("d", 14, Date), "dddd, d MMMM, YYYY")
.Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
You may need to change the date output formats to suit your needs.