Jump to content
Sign in to follow this  
dushkin

Pressing an Outlook 2007 toolbar button

Recommended Posts

dushkin

Hi All,

Can anyone guide me with the task in title?

For example - pressing the "new" button.

Thanks!!!

Share this post


Link to post
Share on other sites
Juvigy

Local $olMailItem = 0
    Local $olFormatRichText = 3
    Local $olImportanceLow = 0
    Local $olImportanceNormal = 1
    Local $olImportanceHigh = 2
    Local $olByValue = 1
    Local $olFormatHTML = 2
    Local $olFormatPlain = 1
    $oOApp = ObjCreate("Outlook.Application")
    $oOMail = $oOApp.CreateItem ($olMailItem)
    $oOMail.Save
    With $oOMail
        .To = ("mail@mail.com")
        .Display
    EndWith
    $oOApp=0

You can also check the outlook UDF for more features.

Share this post


Link to post
Share on other sites
dushkin

Local $olMailItem = 0
    Local $olFormatRichText = 3
    Local $olImportanceLow = 0
    Local $olImportanceNormal = 1
    Local $olImportanceHigh = 2
    Local $olByValue = 1
    Local $olFormatHTML = 2
    Local $olFormatPlain = 1
    $oOApp = ObjCreate("Outlook.Application")
    $oOMail = $oOApp.CreateItem ($olMailItem)
    $oOMail.Save
    With $oOMail
        .To = ("mail@mail.com")
        .Display
    EndWith
    $oOApp=0

You can also check the outlook UDF for more features.

Many thanks Juvigy for your prompt response.

I am aware of this great UDF you mentioned, but this is not exactly what I need.

My problem is to identify the button itself.

The "new" button was just an example.

What I really need is to be able to "press" a private add-in button that we added to the outlook toolbar. Or in general, be able to press any button in the outlook toolbar that the UDF for some reason doesn't support yet... So somehow I need to reach this button and "press" on it - using Autoit or COM methods.

Can you or someone else help with this one?

Thanks!

Share this post


Link to post
Share on other sites
Juvigy

The thing i can think of is sending Alt+N for example. Most items have an ALT+letter shortcuts.

There must be a better way though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.