If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Email work book.
Hi I have a work book or spread sheet, when filled out it must be sent to a supervisor for verification or approval, After approval it needs to be sent to another person. I want to be able to do this in vba code. The code I am currently using to send to one person is below. Can someone please help me? Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim Mail_workbook_Outlook_1() Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = " .CC = "" .BCC = "" .Subject = "Flagged Order" .Body = "New Flagged Order" .Attachments.Add ActiveWorkbook.FullName .Send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub -- Melisa Hutchins |
Thread Tools | |
Display Modes | |
|
|