Custom Action Buttons




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
case "Authorise"
NewItem.Importance = 2
newitem.body = "is this working>?"
case "Reject"
case else
end select
End Function

Can anyone advise of what i am doing wrong?



Sue Mosher [MVP-Outlook]

Adding custom actions programmatically one-offs the item, which means that
it will no longer run code after you save or send it.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question