Auto email

W

WW

Hello

In this age of spam, is it possible to send an email automatically from
excel without 1) user response 2) using Outlook Express' lower security
standards? Can DOS accommodate a "mail" command (as would BASH)?

Thanks

W

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

sulprobil

'Orig: Marcus Schmitt, copied and adapted from http://bert-
koern.de/excel/excel_makros_e.htm:

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 Sub Mail(eMail As String, Optional Subject As
String, _
Optional Body As String)
Call ShellExecute(0&, "Open", "mailto:" + eMail + _
"?Subject=" + Subject + "&Body=" + Body, "", "", 1)
End Sub
Private Sub Command1_Click()
Dim Nachricht As String
' Force Newline with %0D%0A !
Message = "Hello" & "%0D%0A" & "World!"
Call Mail("(e-mail address removed)", "My
Subject", Message)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top