Hi,
I've recently created (with help found here!) an add-in which provides the user with an additional toolbar button to run a document version check.
Applicable documents have their title / version number stored as custom document properties. Running the add-in compares the document name & version number with those in a central log (held in a mutually accessible network location) and advises the user if either the workbook version matches the latest version of that file recorded in the log, or if the workbook has been superceded and a newer version is available, or if the workbook version number exceeds the latest version of that file recorded in the log & that the log should be updated.
That's all working fine. However, I'd like do a little more with it. In the case of workbooks which have been superceded I would like to prevent the file from being either printed or saved.
I've found code which can do all that. However, it all resides in the workbook_beforeclose and workbook_beforeprint events.
Is there a way of an add-in preventing the saving or printing of a workbook? I.e. without the code being held in the subject workbook.
Best regards and in advance, many thanks!
Richard
I've recently created (with help found here!) an add-in which provides the user with an additional toolbar button to run a document version check.
Applicable documents have their title / version number stored as custom document properties. Running the add-in compares the document name & version number with those in a central log (held in a mutually accessible network location) and advises the user if either the workbook version matches the latest version of that file recorded in the log, or if the workbook has been superceded and a newer version is available, or if the workbook version number exceeds the latest version of that file recorded in the log & that the log should be updated.
That's all working fine. However, I'd like do a little more with it. In the case of workbooks which have been superceded I would like to prevent the file from being either printed or saved.
I've found code which can do all that. However, it all resides in the workbook_beforeclose and workbook_beforeprint events.
Is there a way of an add-in preventing the saving or printing of a workbook? I.e. without the code being held in the subject workbook.
Best regards and in advance, many thanks!
Richard