By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,983 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,983 IT Pros & Developers. It's quick & easy.

Only 1 problem left with sending email

P: n/a
Hello all,
I think I solved the problems I spoke off in my previous posts. I now use
Outlook Express as the default email prog and no warnings pop up :):):):)
The only problem I still have is that message appears on screen on Outlook
Express ... and I still have to click the send button.
Does anybody know the setting to avoid this, thus sending the message right
away, without displaying it ...
Here is the code I use :

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
Private Const SW_SHOW = 5

Public Function OpenEmail(EmailAddress As String, _
Optional Subject As String, Optional Body As String) _
As Boolean

Dim lWindow As Long
Dim lRet As Long
Dim sParams As String

sParams = EmailAddress
If LCase(Left(sParams, 7)) <> "mailto:" Then _
sParams = "mailto:" & sParams

If Subject <> "" Then sParams = sParams & "?subject=" & Subject

If Body <> "" Then
sParams = sParams & IIf(Subject = "", "?", "&")
sParams = sParams & "body=" & Body
End If

lRet = ShellExecute(lWindow, "open", sParams, _
vbNullString, vbNullString, SW_SHOW)

OpenEmail = lRet = 0

End Function
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.