VB/E.mail with outlook...Ivan (again)/Jerrid
Posted by Ian on August 31, 2001 7:37 AM
I have asked this question further down and got an answer, Ivan said it would do fine the answer was posted by Jerrid (he did say it wasn't tested by him). it didn't work for me
here's the code I have to date (it's doctored from someone else's)
Private Sub CommandButton1_Click()
Dim ObjOutLook As Object 'Outlook.Application
Dim ObjMailitem As Object 'Outlook.Mailitem
Dim SendAnEmail As Boolean
ThisWorkbook.Save
Set ObjOutLook = CreateObject("Outlook.Application")
Set ObjMailitem = OLook.createitem(0)
ObjMailitem.to = "ian.mcconnell@sitel.co.uk"
ObjMailitem.Subject = "Here's the figure's for the week commencing " _
& Cells(4, 2).Value
ObjMailitem.body = "hello"
''''''''''''''''''''
ObjMailitem.send
End Sub
where I've put ''''''''''' where I'd like to put something like (Also something that works :)):
ObjMailitem.Attachments = the current workbook from it's current location
I know not the first or second bit:
ObjMailitem.Attachments
or
how to send itself
thanks
Ian