Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send an e-mail without prompts - problem

Status
Not open for further replies.

Trumper1

Technical User
Joined
Mar 25, 2004
Messages
4
Location
GB
I have carried out the process described in faq 707-4334 to send an e-mail from Excel without prompts. In about 1 in 10 (sometimes up to 1 in 20) occasions the e-mail fails to send and leaves an unsent mailitem on the desktop which is rather annoying and not especially robust.

Does anybody have any idea why this might be and how to cure it?

Many thanks in advance.
 
FYI

This is the relevant code:

ElseIf [h28] <> "" Then
With objMail
.To = "Middle Office"
.Subject = "Trade: " & [h28] & " " & [d7] & " " & [h31]
.Body = ""
.Display
End With
End If
SendKeys "%{s}", True
Set objMail = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top