Simple way to autoforward

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
 
M

Michael Bauer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top