Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code, based on that at Ron de Bruin's site, which
creates emails exactly as required, except that the SendKeys line does nothing. I've tried some variations of syntax, and it doesn't give an errormessage, but it just doesn't send. Does anyone have a suggestion as to what I'm doing wrong, or an alternative way of getting Outlook Express to send? Sub SendEmail() DatabaseOpen Set template = Workbooks("sendEmail.xls").Sheets("Sheet1") For Each Cell In Workbooks("ycDatabase.xls").Sheets("Database").Col umns("M").Cells.Specia lCells(xlCellTypeConstants) If Cell.Value Like "*@*" Then Recipient = Cell.Value Subj = template.Range("c3").Value msg = "Dear " & Cell.Offset(0, -10).Value & "%0A" msg = msg & "%0A" & template.Range("c5").Value HLink = "mailto:" & Recipient & "?" HLink = HLink & "subject=" & Subj & "&" HLink = HLink & "body=" & msg ActiveWorkbook.FollowHyperlink (HLink) Application.Wait (Now + TimeValue("0:00:02")) Application.SendKeys "%S", True End If Next End Sub -- Gordon Rainsford London UK |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SendKeys syntax problem | New Users to Excel | |||
SendKeys problem | Excel Programming | |||
sendkeys problem | Excel Programming | |||
sendkeys problem for telnet | Excel Programming | |||
SendKeys problem | Excel Programming |