I want when you hit ‘send’ you are presented with a form. This I am developing in Outlook 2010.
Is there a way to populate a combo-box with a list of Macros?
Public Sub Confidential()
Application.ActiveInspector.CurrentItem.Sensitivity = olConfidential
Application.ActiveInspector.CurrentItem.Save
Set MsgSub = Outlook.Application.ActiveInspector.CurrentItem
Set objMail = Outlook.Application.ActiveInspector.CurrentItem
Subject = MsgSub.Subject
MsgSub.Subject = Subject + " - [CONFIDENTIAL]"
Email = objMail.HTMLBody
info = " <html> <body> <FONT color=#666666> <font-size: 11px> <p></p> AUTO TEXT: This message has been marked as 'CONFIDENTIAL' please treat it as such </body> </font> </html>"
objMail.HTMLBody = Email + info
End Sub
Private Sub Sens_DropButtonClick()
Sens.AddItem "Confidential()"
Sens.AddItem "Normal()"
End Sub
Public Sub Send_Click()
Set objMail = Outlook.Application.ActiveInspector.CurrentItem
objMail.Send
End Sub
Would I be right in thinking that this is a public sub?
My goal is when you hit the ‘send’ button a form will appear with a dropdown box, this has 4 options which are the sensitivity options you can use with the emails, except I have created them as macros and added code on them (to add to subject and footer of message) but I wont it so a user is forced to make a selection, hence why I am creating this form instead of having the 4 buttons.
If I understand you correctly, Yes it is possible to do what you want. See this Example
Let’s say you have a userform with 4 options A,B,C and D and the userform code is
Next Paste this in a module
and this in the
ThisOutlookSessionReplace the above comments in the
SelectStatement` with the Macro Names that you want executed depending on the user choice.SNAPSHOTS IN ACTION
And this is what you get when you select the
Option D (ListIndex 3)FOLLOWUP