ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sending a mail via outlook excel 2003 (https://www.excelbanter.com/excel-programming/447464-sending-mail-via-outlook-excel-2003-a.html)

lussac

Sending a mail via outlook excel 2003
 
I had to send a email every day via excel 2003..it is a big range equivalent to 4 pages (b2:j300) with tables and charts...I have already a macro but it is not really a good one as I have to the finish the work by doing control V to past inside the mail the picture...and when I send the mail, the picture is not good and moves...so I am looking for ideas in order to send my range with charts properly with a nice picture in the body of the mail and a pdf file if possible...I don't mind if it is not automatic (opening of email) as I prefer to check before cliking on send at the end...current macros does not send a range with charts..So I am looking forward for any help ..here is my current macro...thks in advance for your help


Sub Send1()
ThisWorkbook.Activate
Worksheets("Global strat").Activate
Application.ScreenUpdating = False
Application.DisplayAlerts = False

Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Global strat")

Dim aname As Name
Set aname = ThisWorkbook.Names("Impression")
aname.RefersToRange.Select

aname.RefersToRange.Copy

Dim objOL As New Outlook.Application
Dim objMail As MailItem
Set objMail = objOL.CreateItem(olMailItem)
objMail.Display

With objMail
.BCC = "
.Subject = "Strategies "

End With

Set objMail = Nothing
Set objOL = Nothing

Const OverwriteExisting = True
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
ObjFSO.CopyFile "P:\.gif", "P:\\", OverwriteExisting

Dim FS
Set FS = CreateObject("Scripting.FileSystemObject")

Application.ScreenUpdating = True
Application.DisplayAlerts = TrueEnd Sub


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com