MailItem.Forward Method

Outlook Developer Reference

Executes the Forward action for an item and returns the resulting copy as a MailItem object.

Syntax

expression.Forward

expression   A variable that represents a MailItem object.

Return Value
A MailItem object that represents the new mail item.

Example

This Visual Basic for Applications (VBA) example uses the Remove method to remove all attachments from a forwarded message before sending it on to Dan Wilson. To run this example, replace 'Dan Wilson' with a valid recipient name and keep a mail item that contains at least one attachment open in the active window.

Visual Basic for Applications
  Sub RemoveAttachmentBeforeForwarding()
    Dim myinspector As Outlook.Inspector
    Dim myItem As Outlook.MailItem
    Dim myattachments As Outlook.Attachments
Set myinspector = Application.ActiveInspector
If Not TypeName(myinspector) = "Nothing" Then
    Set myItem = myinspector.CurrentItem.<strong>Forward</strong>
    Set myattachments = myItem.Attachments
    While myattachments.Count &gt; 0
        myattachments.Remove 1
    Wend
    myItem.Display
    myItem.Recipients.Add "Dan Wilson"
    myItem.Send
Else
    MsgBox "There is no active inspector."
End If

End Sub

See Also