Email with mailto equivalent

E

elf27

Hello,

I've searched the forums and reviewed http://www.rondebruin.nl but I can't
seem to find an answer to a simple question.

I want a macro to email persons in a range and have a custom subject line
but I do not rely on them using outlook. If it's possible, I'd basically like
the equivalent of

mailto:[ARRAY]?subject=Item [VARIABLE X] Posted Online

Any way to do that?
 
J

Jacob Skaria

I am not sure whether I have understood your question...Please elaborate your
query if you are looking for something else.

strToIDs = Combine(ARRAY,";")
strSubject = "------------------"

With OutMail
.To = strToIDs
.CC = ""
.BCC = ""
.Subject = strSubject
.Body = "Hi there"
.Attachments.Add ("C:\test.txt")
.Send
End With

If this post helps click Yes
 
E

elf27

Thanks, Jacob but it didn't work.
Excel didn't like the Combine function.
But, that's basically the right idea. The trouble I'm having is getting an
array of cells with different emails to all be combined in to one string.
then I'll put it in the following:

ThisWorkbook.FollowHyperlink Address:="mailto:" & ARRAY WITH EMAILS
&"?Subject=Blah blah blah"

Jacob Skaria said:
I am not sure whether I have understood your question...Please elaborate your
query if you are looking for something else.

strToIDs = Combine(ARRAY,";")
strSubject = "------------------"

With OutMail
.To = strToIDs
.CC = ""
.BCC = ""
.Subject = strSubject
.Body = "Hi there"
.Attachments.Add ("C:\test.txt")
.Send
End With

If this post helps click Yes
---------------
Jacob Skaria


elf27 said:
Hello,

I've searched the forums and reviewed http://www.rondebruin.nl but I can't
seem to find an answer to a simple question.

I want a macro to email persons in a range and have a custom subject line
but I do not rely on them using outlook. If it's possible, I'd basically like
the equivalent of

mailto:[ARRAY]?subject=Item [VARIABLE X] Posted Online

Any way to do that?
 
D

Dave Peterson

Maybe something like:

Option Explicit
Sub testme()

Dim myAddrRng As Range
Dim URL As String
Dim myStr As String
Dim myCell As Range

Set myAddrRng = Worksheets("Sheet1").Range("a1:A10")

myStr = ""
For Each myCell In myAddrRng.Cells
myStr = myStr & "," & myCell.Value
Next myCell

myStr = Mid(myStr, 2)

URL = "mailto:" & myStr & "?subject=Hi there"

ThisWorkbook.FollowHyperlink Address:=URL

End Sub



Hello,

I've searched the forums and reviewed http://www.rondebruin.nl but I can't
seem to find an answer to a simple question.

I want a macro to email persons in a range and have a custom subject line
but I do not rely on them using outlook. If it's possible, I'd basically like
the equivalent of

mailto:[ARRAY]?subject=Item [VARIABLE X] Posted Online

Any way to do that?
 
R

Ron de Bruin

For the OP

See also this page
http://www.rondebruin.nl/mail/oebody.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




Dave Peterson said:
Maybe something like:

Option Explicit
Sub testme()

Dim myAddrRng As Range
Dim URL As String
Dim myStr As String
Dim myCell As Range

Set myAddrRng = Worksheets("Sheet1").Range("a1:A10")

myStr = ""
For Each myCell In myAddrRng.Cells
myStr = myStr & "," & myCell.Value
Next myCell

myStr = Mid(myStr, 2)

URL = "mailto:" & myStr & "?subject=Hi there"

ThisWorkbook.FollowHyperlink Address:=URL

End Sub



Hello,

I've searched the forums and reviewed http://www.rondebruin.nl but I can't
seem to find an answer to a simple question.

I want a macro to email persons in a range and have a custom subject line
but I do not rely on them using outlook. If it's possible, I'd basically like
the equivalent of

mailto:[ARRAY]?subject=Item [VARIABLE X] Posted Online

Any way to do that?

--

Dave Peterson

__________ Information from ESET Smart Security, version of virus signature database 3972 (20090328) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 3972 (20090328) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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