R
Rich Roller
I was told by a MS employee in a private newsgroup to ask my question in
this public group...
Is there an easy way to have a custom button display just for certain item
types/forms, e.g. Contacts, ideally without complicated VB programming.
More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.
I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to check
here to make sure there isn't another way to do this with less or no
programming.
I'd also like to avoid having to make a custom form and distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.
In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!
Thanks.
-Rich
this public group...
Is there an easy way to have a custom button display just for certain item
types/forms, e.g. Contacts, ideally without complicated VB programming.
More specifically, I created a custom button (method: Customize Toolbar,
drag button to tool bar) that is relavent only to Contacts. The problem is
that this button now shows up for other item types like Message,
Appointment, etc which is confusing to users and undesirable.
I got a tip from an Ken Slovak in public VBA newsgroup which gave me some
clues on how to approach this via VB (see below) but I just wanted to check
here to make sure there isn't another way to do this with less or no
programming.
I'd also like to avoid having to make a custom form and distribute/install
it for each appropriate user. I realize that's what you all do "for a
living" but it's not my preferred choice.
In my dreams, I would just edit properties of the custom button I just
created and click to display on Contacts only... I don't see such a
mechanism but anything similar would be awesome!
Thanks.
-Rich
If you handle the NewInspector event of the Inspectors collection and you
are only interested in creating your button for contacts the first step is
to check for contacts when that event fires. That's the code that uses
Inspector.CurrentItem.Class = olContact. If it's anything but a contact
you
don't instantiate the Inspector wrapper.
Code for creating buttons in Inspectors using a wrapper and collection and
creating the actual buttons in the class is available for both VB 6 and
C#.
The C# example is at http://www.outlookcode.com/codedetail.aspx?id=797 and
the VB 6 code is at
you started.
Ken Slovak
[MVP - Outlook]
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003