Add-in Button Selection

jstevens
GoldLounger
Posts: 2640
Joined: 26 Jan 2010, 16:31
Location: Southern California

Add-in Button Selection

Post by jstevens »

I have an Outlook add-in that has a three button (1 - 2 - 3) prompt to choose from. Button 2 is highlighted by default and I would like to select Button 1 automatically. Is this possible with Outlook VBA code? I'm familiar with Excel's message box and associated VBA code.
Regards,
John

User avatar
HansV
Administrator
Posts: 79365
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Add-in Button Selection

Post by HansV »

Can you edit the source code of the add-in? If so, and if the code uses the MsgBox function, it is the same as in Excel: change vbDefaultButton2 to vbDefaultButton1 or omit it altogether.
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2640
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Add-in Button Selection

Post by jstevens »

Hans,

I'm unable to edit the source code of the add-in. My second thought was to use SendKeys {Tab 2} {ENTER} in Outlook but that isn't working as planned.

Tabbing twice would change the button selection position from 2 to 1.
Regards,
John

User avatar
HansV
Administrator
Posts: 79365
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Add-in Button Selection

Post by HansV »

SendKeys isn't dependable in all recent versions of Windows.

Perhaps you could contact the developer of the add-in...
Best wishes,
Hans