Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code to send a mail from excel
Private Sub Email_Click() Dim strDate As String Application.ScreenUpdating = False Application.DisplayAlerts = False strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h- mm-ss") FName$ = "Confirmation - " & strDate Application.SheetsInNewWorkbook = 1 Set wbNew = Workbooks.Add With wbNew ThisWorkbook.ActiveSheet.Copy (.Worksheets(1)) ..Worksheets(2).Delete With .ActiveSheet.UsedRange ..Copy ..PasteSpecial xlPasteValues Worksheets(1).Protect password:="*******", _ DrawingObjects:=False, Contents:=True, Scenarios:=True End With ..SaveAs Filename:="c:\" & FName$ & ".xls" ..SendMail ", "Confirmation - " & strDate ..ChangeFileAccess xlReadOnly Kill .FullName ..Close SaveChanges:=False End With ThisWorkbook.Close SaveChanges:=False Application.ScreenUpdating = True Application.DisplayAlerts = True End Sub But how would i get this code to send a CC to a recipient? Any help greatly appreciated cheers olly |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Macro how to create email link for the email addresses in aRange or Selection | Excel Worksheet Functions | |||
Email Question | Excel Discussion (Misc queries) | |||
cannot open email reply to previous question | Excel Discussion (Misc queries) | |||
Email from Excel - 2 Part Question | Excel Discussion (Misc queries) | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) |