#1   Report Post  
Junior Member
 
Posts: 6
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I email one sheet from within an excell work book file Marguerite Excel Worksheet Functions 1 April 29th 08 05:06 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM
Best program for address book w/email and print labels? Outlook? pccheryle Excel Discussion (Misc queries) 0 December 7th 05 05:35 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM
simultaneously work in a work book with other users Sweets Excel Discussion (Misc queries) 1 April 18th 05 07:35 PM


All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"