Voting Buttons

  • Thread starter Thread starter Wanda
  • Start date Start date
W

Wanda

I need to invoke a message that has voting buttons. I
created the code and I don't get error messages and it
seems to work for the most part, but my buttons don't
appear. Can you tell me where I am going wrong? Thanks.
***********************

Sub cmdSelVoteMsg_Click()
CreateVoteMessage
End Sub

Sub CreateVoteMessage()
Dim objApp
Dim strMsg
Dim strActions
Dim strButtonAction
Dim objMessage
Dim objAction

strMsg = "Enter the necessary voting button titles,
separated by semicolons."
strActions = InputBox(strMsg, "Create Vote Buttons")
If strActions <> "" Then
'msgbox strActions
Set objApp = CreateObject("Outlook.Application")
Set objMessage = objApp.CreateItem(0)

Do
If InStr(1, strActions, ";") > 0 Then
strButtonAction = Mid(strActions, 1, InStr(1,
strActions, ";") - 1)
strActions = Mid(strActions, InStr(1,
strActions, ";") + 1)
Else
strButtonAction = strActions
strActions = ""
End If

Set objAction = objMessage.Actions.Add
With objAction
.CopyLike = (0)
.Enabled = True
.Name = strButtonAction
.Prefix = "Re: "
.ReplyStyle = (2)
.ResponseStyle = (2)
.ShowOn = (2)
End With
Loop Until strActions = ""

objMessage.Display
End If

Set objApp = Nothing
Set objMessage = Nothing
Set objAction = Nothing
End Sub
 
You will never see voting buttons as you are composing a message, unless you
look on the Options dialog. Voting buttons appear only on the received
message.
 
I am curious as to getting this to work for me, but when
trying to execute I get the following error:

"The macros in this project are disabled. Please refer
to the online help or documentation of the host
application to determine how to enable the macros"

I followed the help documentation to enable with no
luck. It said that it enbled the share but yet I receive
the same error.

Would like to know more about how this works? Does the
receipent need to be running OL? and what kind of reply
do you receive?

Please advise and thanks. -Randy-
 
Tools | Macros | Security. Restart Outlook after resetting the security
level.

The code you cited simply creates a voting button message. If the recipient
does not have Outlook, it won't have voting buttons. If it does and they
reply, you'll receive a standard voting button response. Try it and see for
yourself!
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top