U
upxtechie
Hello,
I am looking for a method to keep track of documents in MS Office by my
COM-add-in. When the user changes between documents the add-in must identify
the document which has received the focus, and recall where that document
originally was loaded from.
Everything would be quiet easy if there would be a saveAs event which whould
have access to the old name and the new name. Unfortunatelly there is no such
event available. Does anyone know a work-around to artificially create such a
save event ?
Live would be even more easy if the office applications would give each
document a unique ID at load time, and would hold such a ID during the whole
lifetime of the document in the application. I would no longer care about the
filename (and it's change by a saveAs operation), but would simply 'register'
the ID at the file load, and use it at documentChange events to identify the
document. Unfortunately I can't find such ID in the documents's properties.
Does anybody know about such a unique ID generated by MS Office applications ?
A work-around would be the storage of a unique ID in a
CustomDocumentProperty. It would work, unless a power user opens the document
properties and starts to do some 'clean-up' works. So that would not be a
save solution.
A invisible tag propertie at each document which could be used to store data
would be a way, but I did not find anything like that.
Some technical background about my project: The add-in shall work in Word,
Excel and Powerpoint in the versions Office 2000, XP and 2003. I am using VB6
+ Office Developer.
Best regards,
Joerg
I am looking for a method to keep track of documents in MS Office by my
COM-add-in. When the user changes between documents the add-in must identify
the document which has received the focus, and recall where that document
originally was loaded from.
Everything would be quiet easy if there would be a saveAs event which whould
have access to the old name and the new name. Unfortunatelly there is no such
event available. Does anyone know a work-around to artificially create such a
save event ?
Live would be even more easy if the office applications would give each
document a unique ID at load time, and would hold such a ID during the whole
lifetime of the document in the application. I would no longer care about the
filename (and it's change by a saveAs operation), but would simply 'register'
the ID at the file load, and use it at documentChange events to identify the
document. Unfortunately I can't find such ID in the documents's properties.
Does anybody know about such a unique ID generated by MS Office applications ?
A work-around would be the storage of a unique ID in a
CustomDocumentProperty. It would work, unless a power user opens the document
properties and starts to do some 'clean-up' works. So that would not be a
save solution.
A invisible tag propertie at each document which could be used to store data
would be a way, but I did not find anything like that.
Some technical background about my project: The add-in shall work in Word,
Excel and Powerpoint in the versions Office 2000, XP and 2003. I am using VB6
+ Office Developer.
Best regards,
Joerg