Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Change Custom Properties with a Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mickey - 20 Oct 2006 18:39 GMT
Hi,
I'm looking for a macro that will allow me to change 2 custom properties.  
In all my documents I created 2 fields ("Approved Date") and ("Effective
Date").  When the document is re-submitted with changes I change both of the
field values from whatever the date is to "DRAFT".  Is there a macro that can
do this?

Thanks,
Mickey
Greg Maxey - 20 Oct 2006 18:47 GMT
Try:
Sub ScratchMacro()
Dim oProp As DocumentProperties
Set oProp = ActiveDocument.CustomDocumentProperties
With oProp
 .Item("Approved Date").Value = "Draft"
 .Item("Effective Date").Value = "Draft"
End With
ActiveDocument.Fields.Update
End Sub

> Hi,
> I'm looking for a macro that will allow me to change 2 custom properties.
[quoted text clipped - 5 lines]
> Thanks,
> Mickey
Mickey - 20 Oct 2006 19:30 GMT
Thank you so much.  Works beautifully.

> Try:
> Sub ScratchMacro()
[quoted text clipped - 16 lines]
> > Thanks,
> > Mickey
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.