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
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