Simple way to autoforward

  • Thread starter Thread starter nyresource
  • Start date Start date
N

nyresource

I am trying to write a script that forwards the current message. From
the examples I see in Microsoft here is what I came up with:

Sub Autoforward()

Dim myinspector As Outlook.Inspector

Dim oNewEmailMessage As Outlook.MailItem

Set oNewEmailMessage = myinspector.CurrentItem.Forward

oNewEmailMessage.Display

oNewEmailMessage.Recipients.Add "(e-mail address removed)"

oNewEmailMessage.Send

End Sub


I get a message that says "Object variable or With block variable not
set"

Any ideas on where I can turn for help?
Thanks
 
Am 26 Sep 2005 13:04:07 -0700 schrieb (e-mail address removed):

You need to set myInspector to an Inspector object, e.g. to the
Application.ActiveInspector.
 
Back
Top