[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can I can to multiple recipients using "mailto:"

Posted on 2005-05-03
4
Medium Priority
?
393 Views
Last Modified: 2006-11-18
I'm using the code below to quickly send an email. I can send to one "to" and one "cc" recipient using this code.
Is there a quick way to modify this so I can send to more than one "to" and more than one "cc" recipients?
I've already tried putting ";" and "," between email addresses and that won't work.
Thanks

    eStr = "mailto:" & clt!Email
    If clt!email2 <> "" Then eStr = eStr & "?cc=" & clt!email2
    Call ShellExecute(hwnd, "open", eStr, "", "", 0)
0
Comment
Question by:spoowiz
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
STStheBest earned 500 total points
ID: 13919015
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 Command1_Click()
ShellExecute 0, "open", "mailto:mailone@sth.com; mailtwo@sth.com;", "", 0, 0
End Sub

Worked fine when I tried it! Just add e-mails and put "; " (mind the space) behind it.

I hope this helped,
STS
0
 

Author Comment

by:spoowiz
ID: 13919142
it worked. when i add the 2nd email, outlook express takes a quite a bit longer to create the new mail msg. is that the same with you?
0
 

Expert Comment

by:STStheBest
ID: 13919264
quite a bit longer = ???
It does make a difference, but it isn't even a second when I try it.
0
 

Author Comment

by:spoowiz
ID: 13919421
mine takes about 5 to 10 seconds
anyways, thanks for your response
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question