Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-09-2012, 02:23 PM
macropod's Avatar
macropod macropod is offline Date Field to add 10 Days to Current Date Windows 7 64bit Date Field to add 10 Days to Current Date Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,381
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

Assuming the field is in the body of the document, the macro is nothing more than:
Code:
Private Sub Document_Open()
ThisDocument.Fields.Update
End Sub
To install it for use, press Alt-F11 to open Word's vb editor. On the left had side of the screen, you'll see a panel containing your document's name and, below that an entry named 'ThisDocument'. Double-click on 'ThisDocument', then paste the above code into it. Press Alt-F11 again to return to the document, then save it. That's all there is to adding the macro to your document.



And yes, all users would need to have Word configured appropriately. For Word to be able to run macros, go to Word Options|Trust Centre>Trust Center Settings and select the 'Disable all macros with notification' option. That will cause Word to ask for permission before allowing macros in a document to run. This setting applies to all documents, except those opened from what Word 2007 & later call 'trusted publishers, 'trusted locations' and trusted documents' (none of which generate the prompt). The dialoge box that opens when you clicked on 'Trust Center Settings' has entries for these as well, but you probably don't need to worry about any of their settings.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 11-12-2012, 06:17 PM
Erbwon Erbwon is offline Date Field to add 10 Days to Current Date Windows Vista Date Field to add 10 Days to Current Date Office 2007
Novice
Date Field to add 10 Days to Current Date
 
Join Date: Nov 2012
Location: Huntington, New York
Posts: 5
Erbwon is on a distinguished road
Default

Thanks for your help, the macro worked perfectly on my end, I still need to test out the document after I upload it to confirm it works correctly for all my users.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Field to add 10 Days to Current Date Meaning of current date vs status date when saving baselines ketanco Project 1 02-08-2012 02:20 PM
Set calendar alarm x days before end date el_ja Outlook 2 01-19-2012 10:09 AM
30+ days Variable Day Date Calculations via Fields ztag Word 2 01-06-2012 11:12 AM
Date Field to add 10 Days to Current Date How to call current PC date and/or current PC year KIM SOLIS Excel 2 11-04-2011 06:09 PM
Creating an Auto-Calc'd Date? Today+7 Days? SoCalTelephone Word 0 10-06-2010 10:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:48 PM.


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