![]() |
Send a range in Excel as the body of an Outlook Express message
Hi Katie,
See : http://www.rondebruin.nl/sendmail.htm While there, look at Ron de Bruin's SendMail addins. --- Regards, Norman "Katie" wrote in message ... Is Outlook Express can send a range in Excel as the body like Outlook? I would like to write a marco to send a range in Excel with Outlook Express use Copy and Paste. I have find some code from the Internet as the following: Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Sub SendEMail() Dim Email As String, Subj As String Dim Msg As String, URL As String Dim r As Integer, x As Double Dim katie As Variant Email = ' Message subject Subj = "Price List" ' Compose the message Worksheets("Sheet1").Activate ActiveSheet.UsedRange.Copy Application.SendKeys "{Tab}{Tab}{Tab}{Tab}{Tab}^{End}{Return}{Return}^v " <== "I would like to paste the range in the body but don't know how to do that." Msg = <== ' Replace spaces with %20 (hex) Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20") Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20") ' Replace carriage returns with %0D%0A (hex) Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf, "%0D%0A") ' Create the URL URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg ' Execute the URL (start the email client) ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus End Sub Is there any way to paste the range as the body of the message other then sendkey? Thanks. |
Send a range in Excel as the body of an Outlook Express message
Hi Katie
Is there any way to paste the range as the body of the message other then sendkey? Not really with OE For a small range you can use this http://www.rondebruin.nl/mail/oebody.htm But if you are using Win 2000 or windows XP look at this page http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Katie" wrote in message ... Is Outlook Express can send a range in Excel as the body like Outlook? I would like to write a marco to send a range in Excel with Outlook Express use Copy and Paste. I have find some code from the Internet as the following: Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Sub SendEMail() Dim Email As String, Subj As String Dim Msg As String, URL As String Dim r As Integer, x As Double Dim katie As Variant Email = ' Message subject Subj = "Price List" ' Compose the message Worksheets("Sheet1").Activate ActiveSheet.UsedRange.Copy Application.SendKeys "{Tab}{Tab}{Tab}{Tab}{Tab}^{End}{Return}{Return}^v " <== "I would like to paste the range in the body but don't know how to do that." Msg = <== ' Replace spaces with %20 (hex) Subj = Application.WorksheetFunction.Substitute(Subj, " ", "%20") Msg = Application.WorksheetFunction.Substitute(Msg, " ", "%20") ' Replace carriage returns with %0D%0A (hex) Msg = Application.WorksheetFunction.Substitute(Msg, vbCrLf, "%0D%0A") ' Create the URL URL = "mailto:" & Email & "?subject=" & Subj & "&body=" & Msg ' Execute the URL (start the email client) ShellExecute 0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus End Sub Is there any way to paste the range as the body of the message other then sendkey? Thanks. |
All times are GMT +1. The time now is 02:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com