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
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