i have a report that i would like to send via excel. it will include the recipitents, subject and the information in the body. actually it could copy the cells in question. what i did so far is create a button and assign a macro to it with this code:
Private Sub CommandButton1_Click() Application.Dialogs(xlDialogSendMail).Show arg1:=Sheets('Sheet1').Range('E3'), _ arg2:=Sheets('Sheet1').Range('E7') End Sub
the problem is that this command sends the workbook as attachment.
can someone help me with the code that will allow me to do this.
thanks a million!
cheers
Set a reference to the ‘Microsoft Outlook xx.x Object Library’ and you can use this code as an example of what to do to build or send an email:
As it is it will just display the email without sending. You can comment out the .display line and uncomment the .send to just send it.