LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Help on e-mailing worksheets

Hi, I have adapted some code posted on here in order to e-mail each
sheet in a workbook to the e-mail addresses entered into cell A1 on
each sheet. What I would like to do is to break all the links in the
new workbooks before they are sent. I would also like to insert a
message box asking to confirm the action before it is carried out (ie -
"e-mail separate sheets?" Yes/No/Cancel)
Any help would be very much appreciated - Thanks!
The existing code I have is as follows:
Sub email_worksheets2()
Dim sh As Worksheet
Dim wb As Workbook
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
If sh.Range("a1").Value Like "?*@?*.?*" Then
sh.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Cost Centre Reporting - " & sh.Name & ".xls"
.SendMail ActiveSheet.Range("a1").Value, _
"Please find attached your detailed " & sh.Name & "
cost centre report"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
End If
Next sh
Application.ScreenUpdating = True
End Sub

 
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
I need to import my Excel Mailing list into mailing label format. Gord Dibben Excel Discussion (Misc queries) 0 November 5th 09 10:16 PM
I need to import my Excel Mailing list into mailing label format. Lyn Excel Discussion (Misc queries) 0 November 5th 09 08:11 PM
merging and mailing multiple worksheets April Excel Discussion (Misc queries) 1 February 22nd 09 09:41 PM
E-mailing single worksheets LeeGBristol Excel Discussion (Misc queries) 1 November 16th 06 04:05 PM
how do i convert MS Word mailing labels into an Excel mailing lis. unrhyll Excel Discussion (Misc queries) 1 February 4th 05 12:19 AM


All times are GMT +1. The time now is 07:26 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"