Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Outlook Email with Attachment
#1
I'm trying add an attachment to an Outlook email but I got a sub that I'm unfamiliar with.
can some one help me with this?


Macro Send Email Via Outlook2
Code:
Copy      Help
;/exe 1
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.4
Outlook.Application oolApp._create
Outlook.MailItem email=oolApp.CreateItem(0)
email.Recipients.Add("ken.gray@somewhere.tv")

email.DeleteAfterSubmit="True"

;Send the Email
_s.timeformat("{T}")
email.Subject = _s
email.Body="this is the body"
email._setevents("sub.email")
email.Send
Macro [b]Send Email Via Outlook2[/b] [help1][/help1]
______________________________________________________________
#sub email_AttachmentAdd
function Outlook.Attachment'Attachment ;;Outlook._MailItem'email
An old blog on QM coding and automation.

The Macro Hook
#2
email_AttachmentAdd is an event function. You probably don't need it and setevents.

email.Attachments.Add("file")
#3
thanks.
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)