View Single Post
  #10  
Old February 23rd 06, 06:40 AM posted to microsoft.public.outlook.program_vba
Rich Roller
external usenet poster
 
Posts: 8
Default Automate keystrokes w/ VBA?

Guys I'm not sure I totally follow.

I know how to create a button via the add/remove GUI (customize toolbar) but
how do I create a button conditionally? "in an event handler"? Or is it
possible to edit the properties of the button once it's created to make it
display conditionally (only if in Contacts form/view)?

Again, I'm novice programming so it'd have to be pretty easy, as was the
above tip for jumping to a specific field.

-Rich

"Ken Slovak - [MVP - Outlook]" wrote in message
...
Yes, sorry, Inspector.CurrentItem.Class = olContact.

The button should be created in an event handler for NewInspector, that's
the best way to do it.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Michael Bednarek" wrote in message
...
On Sun, 19 Feb 2006 17:38:25 -0500, "Ken Slovak - [MVP - Outlook]" wrote
in microsoft.public.outlook.program_vba:

Can't you just test for Inspector.CurrentItem = olContact when you create


(Shouldn't that be: Inspector.CurrentItem.Class = olContact ?)

your button? Don't create the button if the test is True.


That assumes the OP creates the button programmatically via an event
handler; I doubt that.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"




Ads