Email range as a email to SMS

soccer4ward

New Member
Joined
Aug 11, 2020
Messages
8
Office Version
  1. 2016
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hello,

I am looking to create a macro that selects a specific range (2 columns) and emails it to phone numbers (e.g. 5551112222@vtext.com).
The range looks something like this:
Apples
5%​
Oranges
4%​
Bananas
4%​
Tomatos
3%​
Other
50%​

The issue i'm running into is the fact that it needs to be cell phone friendly. I don't have a problem sending that email to regular email addresses. However, when it comes to sending it to phones, I receive them as an attachment without actual attachment. My thinking is, i want to convert this range into a text file and then send the text from a text file (but i'm not a pro)
Any ideas?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,

I'm assuming the service centre strips all kinds of email formatting like RTF, .HTML anyway to forward it as an SMS.
So whatever works for you. Maybe just extract the text values and try that?

Here's a basic mail.
I've used column A and the offset to grab column B too. Separating them with a , and a newline with a ;

I left the message box in so you can see the output.
How it appears to the end user - you tell us.

Code:
Sub Mail_it()

EmailSubject = ""
EmailSendTo = ""
EmailCCTo = ""

Set rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))

For Each cell In rng

If cell.Value <> "" Then

MailBody = MailBody & cell.Value & ", " & cell.Offset(0, 1).Value & "; " & vbNewLine

End If
Next

MsgBox (MailBody)

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(o)
With OutMail
.Subject = EmailSubject
.To = EmailSendTo
.CC = EmailCCTo
.Body = MailBody
.Display
'.Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top