Send Email Vba With Attachment. Sub emailworkbook purpose. Now this code will send the email from your vba outlook mail.
If you want to keep someone in cc write his her email id in the cc column. Sub send email fromexcel dim edress as string dim subj as string dim message as string dim filename as string dim outlookapp as object dim outlookmailitem as object dim myattachments as object dim path as string dim lastcol as integer dim attachment as string dim x as integer x 2 do while sheet7 cells 2 x set outlookapp createobject outlook application set outlookmailitem outlookapp createitem 0 set myattachments outlookmailitem attachments path sheet7 cells 5 x. This vba macro code with add the entire activeworkbook as an attachment to a brand new outlook message.
Email activeworkbook as outlook attachment.
Run the above code and it will send the email with the mentioned body of the email with the current workbook as the attachment. Massage in massage body column. Next thing is we need to mention the subject for the email we are sending. Now to send emails to each email id in column follow these steps.