Thread: Date Fields
View Single Post
 
Old 05-13-2012, 06:36 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,342
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi umesh,

The following macro will lock all DATE fields in the document.
Code:
Sub LockDates()
Dim Fld As Field, Rng As Range
For Each Rng In ActiveDocument.StoryRanges
  For Each Fld In Rng.Fields
    If Fld.Type = wdFieldDate Then Fld.Locked = True
  Next
Next
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote