ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Emailing Active Worksheet (https://www.excelbanter.com/excel-programming/351771-emailing-active-worksheet.html)

James T

Emailing Active Worksheet
 
I have written a bit of a macro to email the active sheet in an excel (as
below).

I want the marco to look at cell A29 in the sheet and use the value that is
in that cell as as the recipient email address. However not sure how to do
that??

Would appreciate any feedback.

Thanks

James

Sub Mail_ActiveSheet_Outlook()
Columns("A:I").Select
Selection.Copy
Columns("A:I").Select
Selection.EntireColumn.Hidden = False
Range("A1:I26").Select
Application.CutCopyMode = False
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Columns("A:I").EntireColumn.AutoFit
Range("A1").Select
Application.CutCopyMode = False
Application.Dialogs(xlDialogSendMail).Show _
arg1:=A29, _
arg2:="Bizlink Quartile Report"
ActiveWorkbook.Close
Range("A1").Select
End Sub

Gary Keramidas

Emailing Active Worksheet
 
check ron's site

http://www.rondebruin.nl/mail/oebody.htm

--


Gary


"James T" wrote in message
...
I have written a bit of a macro to email the active sheet in an excel (as
below).

I want the marco to look at cell A29 in the sheet and use the value that is
in that cell as as the recipient email address. However not sure how to do
that??

Would appreciate any feedback.

Thanks

James

Sub Mail_ActiveSheet_Outlook()
Columns("A:I").Select
Selection.Copy
Columns("A:I").Select
Selection.EntireColumn.Hidden = False
Range("A1:I26").Select
Application.CutCopyMode = False
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Columns("A:I").EntireColumn.AutoFit
Range("A1").Select
Application.CutCopyMode = False
Application.Dialogs(xlDialogSendMail).Show _
arg1:=A29, _
arg2:="Bizlink Quartile Report"
ActiveWorkbook.Close
Range("A1").Select
End Sub




Ron de Bruin

Emailing Active Worksheet
 
The link that Gary posted is for text in the body with Outlook Express

Look here instead
http://www.rondebruin.nl/sendmail.htm


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


"Gary Keramidas" <GKeramidasATmsn.com wrote in message ...
check ron's site

http://www.rondebruin.nl/mail/oebody.htm

--


Gary


"James T" wrote in message ...
I have written a bit of a macro to email the active sheet in an excel (as
below).

I want the marco to look at cell A29 in the sheet and use the value that is
in that cell as as the recipient email address. However not sure how to do
that??

Would appreciate any feedback.

Thanks

James

Sub Mail_ActiveSheet_Outlook()
Columns("A:I").Select
Selection.Copy
Columns("A:I").Select
Selection.EntireColumn.Hidden = False
Range("A1:I26").Select
Application.CutCopyMode = False
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Columns("A:I").EntireColumn.AutoFit
Range("A1").Select
Application.CutCopyMode = False
Application.Dialogs(xlDialogSendMail).Show _
arg1:=A29, _
arg2:="Bizlink Quartile Report"
ActiveWorkbook.Close
Range("A1").Select
End Sub







All times are GMT +1. The time now is 02:22 PM.

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