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

Posted on 2005-05-03
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.

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

    Accepted Solution

    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", ";;", "", 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,

    Author Comment

    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?

    Expert Comment

    quite a bit longer = ???
    It does make a difference, but it isn't even a second when I try it.

    Author Comment

    mine takes about 5 to 10 seconds
    anyways, thanks for your response

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    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…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now