ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can i attach active workbook to email- please see the macro (https://www.excelbanter.com/excel-programming/334570-how-can-i-attach-active-workbook-email-please-see-macro.html)

stric[_3_]

How can i attach active workbook to email- please see the macro
 

This is the part of the macro that I created.

Sheets("Contract Expiration Report").Copy
Set MItem = OutlookApp.CreateItem(0)
With MItem
.To = EmailAddr
.Subject = RegionToGet
.Body = Msg
.Display
End With
ActiveWorkbook.Close Savechanges:=False

The whole macro filter out certain records, saves them in a sheet an
then is supposed to send the sheet to EmailAddr. The problem is tha
everything but the sheet goes. Can you tell me how to attach tha
sheet?
Or how can I attach newly created files in general

--
stri
-----------------------------------------------------------------------
stric's Profile: http://www.excelforum.com/member.php...fo&userid=2523
View this thread: http://www.excelforum.com/showthread.php?threadid=38727


Ron de Bruin

How can i attach active workbook to email- please see the macro
 
Hi stric

Look on my site for examples
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"stric" wrote in message
...

This is the part of the macro that I created.

Sheets("Contract Expiration Report").Copy
Set MItem = OutlookApp.CreateItem(0)
With MItem
To = EmailAddr
Subject = RegionToGet
Body = Msg
Display
End With
ActiveWorkbook.Close Savechanges:=False

The whole macro filter out certain records, saves them in a sheet and
then is supposed to send the sheet to EmailAddr. The problem is that
everything but the sheet goes. Can you tell me how to attach that
sheet?
Or how can I attach newly created files in general?


--
stric
------------------------------------------------------------------------
stric's Profile: http://www.excelforum.com/member.php...o&userid=25230
View this thread: http://www.excelforum.com/showthread...hreadid=387279





All times are GMT +1. The time now is 10:31 AM.

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