The problem is likely to be that the documents have DATE fields when they
probably need CREATEDATE fields. DATE fields reflect the system date of the
PC, whereas CREATEDATE field reflect the date that the document was created.
You can confirm that by Pressing ALT+F9 and checking the field type. If that
is indeed the case the following macro will convert all the DATE fields to
CREATEDATE fields in all the docuemnts in a selected folder:
Sub BatchFixDates()
Dim myFile As String
Dim PathToUse As String
Dim myDoc As Document
Dim iFld As Integer
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select Folder containing the documents to be modifed and click
OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
PathToUse = fDialog.SelectedItems.Item(1)
If Right(PathToUse, 1) <> "\" Then PathToUse = PathToUse + "\"
End With
If Documents.Count > 0 Then
Documents.Close Savechanges:=wdPromptToSaveChanges
End If
myFile = Dir$(PathToUse & "*.doc")
While myFile <> ""
Set myDoc = Documents.Open(PathToUse & myFile)
ActiveWindow.View.ShowFieldCodes = True
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type = wdFieldDate Then
.Code.Text = Replace(.Code.Text, "DATE", "CREATEDATE")
.Update
End If
End With
Next iFld
ActiveWindow.View.ShowFieldCodes = False
myDoc.Close Savechanges:=wdSaveChanges
myFile = Dir$()
Wend
End Sub
http://www.gmayor.com/installing_macro.htm
However, there are other types of date fields that may be involved. The
obvious one being PRINTDATE. If it is PRINTDATE fields (or some other field
type) that is the issue report back.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>