Home |
Search |
Today's Posts |
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Send a Sheet as body of Outlook Email | Excel Discussion (Misc queries) | |||
Fw: send two or more files with Excel and Outlook Express | Excel Discussion (Misc queries) | |||
Excel(with hyperlinks) as a message body of outlook mail | Excel Discussion (Misc queries) | |||
How do use outlook express to send email in office 2003 | Excel Discussion (Misc queries) | |||
Send to Outlook 2000 not Outlook Express | Excel Discussion (Misc queries) |