PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Voting Buttons
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Voting Buttons
![]() |
Voting Buttons |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Wanda" <anonymous@discussions.microsoft.com> wrote in message news:114bc01c3f4c7$1456fbe0$a401280a@phx.gbl... > 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 |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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- >-----Original Message----- >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 >. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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 http://www.outlookcode.com/jumpstart.aspx "Randal W. Hozeski" <hozeski.randalw@rwhinc.us> wrote in message news:13b2101c3f7b7$a4558610$a401280a@phx.gbl... > 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- > > > > > >-----Original Message----- > >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 > >. > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

