Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

800A01B6 objectmail.from

Status
Not open for further replies.

JPGalea

Programmer
Apr 19, 2009
20
0
0
US
Hi,
Email works fine until I add 'objmail.From' to my script. Then I get:
Object doesn't support this property or method: 'objectmail.from'

This is content of vbs file:
set objoutlook=CreateObject("Outlook.Application")
set objmail=objoutlook.CreateItem(0)
objmail.To = "reciptent"
objmail.From = "sender"
objmail.Subject = "subject"
objmail.Body =
objmail.Send
set objmail=nothing
set objoutlook=nothing

Thanks in advance,
Joe
 
if you open up outlook and go to the object browser in visual basic editor, you should be able to find MailItem class / object. i presume this is what .CreateItem(0) creates an instance of?
The object browser kindly gives you a list of available methods and properties.... From is not an available property, hence the error message Object does not support this method or property,
Properties which are similar to From are, SenderEmailAddresss, SenderName, SenderType, SentOnBehalfOfName
 
I'd try the SentOnBehalfOfName property.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
SentOnBehalfOfName works fine!

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top