Dec 19, 2007 #1 Dtown266 Nuclear Oct 31, 2006 47 0 0 US im trying to write a macro to changes the description property of a document while it is in the vault. I can't seem to figure it out anyone trying this already. thanks
im trying to write a macro to changes the description property of a document while it is in the vault. I can't seem to figure it out anyone trying this already. thanks
Dec 19, 2007 #2 Badwolf Aerospace Jan 26, 2005 68 0 0 GB Hi found an old bit of code...might be rickety but it seems to work - assuming you're using PDMW not PDMWE It assumes that you've already connected to the vault..as MyConnection Dim MyDoc as PDMWDocument Dim errorcode Set MyDoc = MyConnection.GetSpecificDocument("put doc name here") MyDoc.TakeOwnerShip MyDoc.Properties.Add("Name of property goes here") MyDoc.Properties("Name of property goes here") = "New property value" errorcode = MyDoc.Properties.Update() MyDoc.ReleaseOwnerShip As I said, this is old and needs tidying, but it should hopefully work. Regards Upvote 0 Downvote
Hi found an old bit of code...might be rickety but it seems to work - assuming you're using PDMW not PDMWE It assumes that you've already connected to the vault..as MyConnection Dim MyDoc as PDMWDocument Dim errorcode Set MyDoc = MyConnection.GetSpecificDocument("put doc name here") MyDoc.TakeOwnerShip MyDoc.Properties.Add("Name of property goes here") MyDoc.Properties("Name of property goes here") = "New property value" errorcode = MyDoc.Properties.Update() MyDoc.ReleaseOwnerShip As I said, this is old and needs tidying, but it should hopefully work. Regards
Dec 19, 2007 #3 Badwolf Aerospace Jan 26, 2005 68 0 0 GB I should add that you may need to manually refresh your vault in order to see the changes. Upvote 0 Downvote
Dec 19, 2007 Thread starter #4 Dtown266 Nuclear Oct 31, 2006 47 0 0 US thanks i didn't know you needed to update the vault. Upvote 0 Downvote