Just wanted to add that this statement from the PI ProcessBook VBA Language Reference seems completely false.
"The Action property, which is read-only, reads the Action string of the entry. It will return
either the relative or absolute path depending on the option that was selected when the entry
was defined. To explicitly get either form of path, set the flags on the entry using the Options
property, get the Action, and then restore the flags."
This is exactly what I need but doesn't work at all. I always get the absolute path.
Please report this to customer support. It gets a higher priority if it comes from a customer than it does if I write it up internally.
I believe with "Workbook" you are referring to a ProcessBook (extension PIW), right?
Back in 2007, I was dealing with a case where links on ProcessBook buttons had become broken. There was a ProcessBook update from 2.35 to 3.0 involved but I am not sure anymore what had caused links to break. However, the ProcessBook file was huge with a few hundreds of buttons. We used Excel VBA to read the links behind buttons, stored the links uniquely inside Excel. The second step was manually complementing "old" links with "new" ones to create a "old" to "new" conversion table. The next step was running another VBA script that was replacing links inside the ProcessBook using the conversion table.
I am attaching a version of the Excel 2003 Workbook and a manual that briefly describes the issue and the usage. You will need to modify the code in order to read from ProcessBook labels. Please look into properties other than Type for object pbBook.Entries(i). pbBook is declared as ProcBook and the Entries property allows you to iterate through the Entries.
If you decide to call OSIsoft Technical Support as suggested by David, you may want to refer to call # 190231.
example.zip 292.8 KB