Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

pdmwork properties questions

Status
Not open for further replies.

Dtown266

Nuclear
Joined
Oct 31, 2006
Messages
47
Location
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
 
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





 
I should add that you may need to manually refresh your vault in order to see the changes.

 
thanks

i didn't know you needed to update the vault.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top