Actions.Add Method (Outlook)
Published: July 16, 2012
Creates a new action in the Actions collection.
expression A variable that represents an Actions object.
An Action object that represents the new action.
This VBA example creates a new mail message and uses the Add method to add an Action to it. To run this example without any errors, replace 'Dan Wilson' with a valid recipient name.
Sub AddAction() Dim myItem As Outlook.MailItem Dim myAction As Outlook.Action Set myItem = Application.CreateItem(olMailItem) Set myAction = myItem.Actions.Add myAction.Name = "Link Original" myAction.ShowOn = olMenuAndToolbar myAction.ReplyStyle = olLinkOriginalItem myItem.To = "Dan Wilson" myItem.Send End Sub