Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
email
Sorry I posted this in the wrong group earlier
Someone from the group kindly gave me the following code for sending a range as an e-mail ""Public Sub SendEMailByURL() Dim vURL As String Dim vEmail As String Dim vSubj As String Dim vMsg As String Dim vTitleEmail As String Dim i As Long Dim vShell 'Copy range selection to paste Range("a8:p18").Copy 'Email data vEmail = " vSubj = "Raukawa" vMsg = " " vTitleEmail = vSubj 'Spaces to hexdecimal vSubj = Application.WorksheetFunction.Substitute(vSubj, " ", "%20") vMsg = Application.WorksheetFunction.Substitute(vMsg, " ", "%20") 'Carriage Returns to hexdecimal vMsg = Application.WorksheetFunction.Substitute(vMsg, vbCrLf, "%0D%0A") vURL = "mailto:" & vEmail & "?subject=" & vSubj & "&body=" & vMsg 'Shell the Windows Start vShell = Shell(Left("Start " & vURL, 460), vbHide) 'Wait window email before sending keystrokes WaitEmail: On Error Resume Next i = i + 1 Application.Wait (Now + TimeValue("0:00:01")) AppActivate vTitleEmail 'Verify your title email If Err.Number < 0 And i < 30 Then GoTo WaitEmail Application.SendKeys "{TAB}{TAB}{TAB}{TAB}~^v" Application.Wait (Now + TimeValue("0:00:01")) End Sub"" It works perfectly from home where I use Outlook express I can't get it to function from work where I use Outlook It stops at the line: "vShell = Shell(Left("Start " & vURL, 460), vbHide)" I'm not savvy enough to work it out for myself Can someone please help? Barry |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
email
Hi Beeel
look at this webpage for examples http://www.rondebruin.nl/sendmail.htm -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Beeel" wrote in message ... Sorry I posted this in the wrong group earlier Someone from the group kindly gave me the following code for sending a range as an e-mail ""Public Sub SendEMailByURL() Dim vURL As String Dim vEmail As String Dim vSubj As String Dim vMsg As String Dim vTitleEmail As String Dim i As Long Dim vShell 'Copy range selection to paste Range("a8:p18").Copy 'Email data vEmail = " vSubj = "Raukawa" vMsg = " " vTitleEmail = vSubj 'Spaces to hexdecimal vSubj = Application.WorksheetFunction.Substitute(vSubj, " ", "%20") vMsg = Application.WorksheetFunction.Substitute(vMsg, " ", "%20") 'Carriage Returns to hexdecimal vMsg = Application.WorksheetFunction.Substitute(vMsg, vbCrLf, "%0D%0A") vURL = "mailto:" & vEmail & "?subject=" & vSubj & "&body=" & vMsg 'Shell the Windows Start vShell = Shell(Left("Start " & vURL, 460), vbHide) 'Wait window email before sending keystrokes WaitEmail: On Error Resume Next i = i + 1 Application.Wait (Now + TimeValue("0:00:01")) AppActivate vTitleEmail 'Verify your title email If Err.Number < 0 And i < 30 Then GoTo WaitEmail Application.SendKeys "{TAB}{TAB}{TAB}{TAB}~^v" Application.Wait (Now + TimeValue("0:00:01")) End Sub"" It works perfectly from home where I use Outlook express I can't get it to function from work where I use Outlook It stops at the line: "vShell = Shell(Left("Start " & vURL, 460), vbHide)" I'm not savvy enough to work it out for myself Can someone please help? Barry |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Macro how to create email link for the email addresses in aRange or Selection | Excel Worksheet Functions | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
can I copy a column of email addresses, paste into email address? | New Users to Excel | |||
Transfer Email addresses from spreadsheet to email address book | Excel Discussion (Misc queries) | |||
Email editor closes when forwarding Excel-embedded email | Setting up and Configuration of Excel |