H
homecinemauk
I am using an outlook object in the following way to send a email from
excel:
Sub sendmessage()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.Subject = "hi"
.To = "(e-mail address removed)"
.from ="(e-mail address removed)" ' complains HERE!
.Body = "yes this is a test!"
.Attachments.Add ("C:\Documents and Settings\user\Desktop
\doc.xls") ' Must be complete path
.Save
End With
Set OutMail = Nothing
end sub
I am sending via a company outlook account. However, the options in a
new mail item allow me to send a mail item with a different sender so
that the mail is not personalised and all replies can be processed
according to rules:
When running the code a message complains of this method or property
not being available to the object.
Any takers???
excel:
Sub sendmessage()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.Subject = "hi"
.To = "(e-mail address removed)"
.from ="(e-mail address removed)" ' complains HERE!
.Body = "yes this is a test!"
.Attachments.Add ("C:\Documents and Settings\user\Desktop
\doc.xls") ' Must be complete path
.Save
End With
Set OutMail = Nothing
end sub
I am sending via a company outlook account. However, the options in a
new mail item allow me to send a mail item with a different sender so
that the mail is not personalised and all replies can be processed
according to rules:
When running the code a message complains of this method or property
not being available to the object.
Any takers???