Thread: [Solved] Stop Automatic Date-Update
View Single Post
 
Old 11-10-2016, 12:05 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If a simple date is typed as text from the keyboard, it is not going to update any more than if you were to type in this sentence, it would update. If your date is updating, you have inserted a date field. Right click and toggle the field to view the field.

A CREATEDATE field reflects the date the document was created (or saved using SAVEAS). You can insert it as many times as you require in a document and it will always display that date. The problem highlighted with CREATEDATE is that the document is saved using SAVINGAS with a different name. The date you do that then becomes the new CREATEDATE.

You cannot stop a date field from updating. It will update to reflect the system date of the computer when the document is opened and you cannot undo that change. You can change that DATE field to a CREATEDATE field but there is no guarantee that the date thus produced was the intended date.

As long as documents are renamed the CREATEDATE will be an issue. Just make sure that it isn't an issue for others in your documents, by inserting the dates as text and not as fields.

If you are using a template which has lots of Date fields, then unlink them before saving the document for the last time. You can do that with a macro http://www.gmayor.com/installing_macro.htm e.g.

Code:
Option Explicit

Sub UnlinkAllDateFields()
Dim oStory As Range
Dim oFld As Field
    For Each oStory In ActiveDocument.StoryRanges
        For Each oFld In oStory.Fields
            If oFld.Type = wdFieldDate Or oFld.Type = wdFieldDate Then
                oFld.Unlink
            End If
        Next oFld
        If oStory.StoryType <> wdMainTextStory Then
            While Not (oStory.NextStoryRange Is Nothing)
                Set oStory = oStory.NextStoryRange
                For Each oFld In oStory.Fields
                    If oFld.Type = wdFieldDate Or oFld.Type = wdFieldDate Then
                        oFld.Unlink
                    End If
                Next oFld
            Wend
        End If
    Next oStory
    Set oStory = Nothing
lbl_Exit:
    Exit Sub
End Sub
You may also find http://www.gmayor.com/FutureDateAddIn.htm useful?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote