![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 5
|
Hi!
I have no code to post. I'm trying to find a code to send 2 out of 7 sheets from my workbook by email via outlook. let say sheets 1,2,3,4,5,6,7 want to send 2 and 6 by email to MrTest@Test.com with subject : this is only a test thanks Regards jeff |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Sydney/Brisbane , Australia
Posts: 539
|
I can give you the code to send the entire workbook. you can muck around with it so it sends just a couple of pages. You will need to create your own code to copy the two necessary sheets to a new workbook so that you can then send them(this code sends a workbook not sheets)..
'myworkbook is file name 'me@me.me is the e-mail of recipient Workbooks("myworkbook".xls").HasRoutingSlip = True With Workbooks("myworkbook.XLS").RoutingSlip .Delivery = xlOneAfterAnother .Recipients = Array("me@me.me") .Subject = "test only" .Message = "Do you think this is cool" Workbooks("myworkbook.XLS").Route |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Location: KC, MO
Posts: 18
|
why not use the posted code that Mr. Excel already has in his archives section:
Sheets(3).Copy Application.Dialogs(xlDialogSendMail).Show _ arg1:=RecipientEmailAddress, _ arg2:="subject line goes here" ActiveWorkbook.Close SaveChanges:=False |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|