You need to monitor the NewInspector event for a Inspectors collection
declared using WithEvents at the module level. You would get the Inspectors
collection from the Application.Inspectors object during Application_Startup
in ThisOutlookSession. Then simply don't process any Inspectors in the
NewInspector event if it doesn't meet your criteria.
It's also best to implement an Inspector wrapper, so that your custom
toolbars/buttons will work if multiple items are opened (and you won't be
subject to the "last inspector wins" scenario).
For some great sample code that shows best practices with Inspectors and
custom toolbars, see the COM Add-In projects here:
http://www.slovaktech.com/code_samples.htm
--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
Collaborative Innovations
-> Try Picture Attachments Wizard For Microsoft Outlook <-
Web:
http://www.collaborativeinnovations.ca
Blog:
http://blogs.officezealot.com/legault