Jump to content

Pressing an Outlook 2007 toolbar button


Recommended Posts

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.

Link to comment
Share on other sites

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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...