Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / October 2004

Tip: Looking for answers? Try searching our database.

Custom Action Buttons

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathan - 12 Oct 2004 11:55 GMT
Hi

I have a book Microsoft Outlook Programming, that has been very useful to
help me create a form.  I have almost completed it, but i have two actions
once called "Authorise" and another called "Reject".  I have created these
action buttons as follows:

Function Item_Open()

    set objAction1  = item.actions.add
    with objAction1
        .name = "Authorise"
        .enabled = "True"
        .prefix = "Authorised : "
        .ReplyStyle = 0
        .ResponseStyle = 2
    end with
    set objAction2  = item.actions.add
    with objAction2
        .name = "Reject"
        .enabled = "True"
        .prefix = "Rejected : "
        .ReplyStyle = 0
        .ResponseStyle = 2
    end with

end function

however, when i try to use to following code to handle these buttons, it
doesnt seem to do anything.

Function Item_CustomAction(ByVal Action, ByVal NewItem)
    select case Action.name
        case "Authorise"
            NewItem.Importance = 2
            newitem.body = "is this working>?"
            msgbox("Authorised")
        case "Reject"
        case else
            msgbox("else")
    end select
End Function

Can anyone advise of what i am doing wrong?

TIA

Nathan
Sue Mosher [MVP-Outlook] - 12 Oct 2004 21:31 GMT
Adding custom actions programmatically one-offs the item, which means that
it will no longer run code after you save or send it.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi
>
[quoted text clipped - 44 lines]
>
> Nathan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.