Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 05-13-2012, 06:36 PM
macropod's Avatar
macropod macropod is offline Date Fields Windows 7 64bit Date Fields Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2010 - DOCX File with fields -> PDF with fields senglory Word 2 03-27-2012 10:10 AM
Date Fields Meaning of current date vs status date when saving baselines ketanco Project 1 02-08-2012 02:20 PM
30+ days Variable Day Date Calculations via Fields ztag Word 2 01-06-2012 11:12 AM
new appointment date always reverts back to today's date msills Outlook 0 08-24-2007 08:57 AM
Date Fields Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft