Avatar of Phil
Phil
Flag for United States of America asked on

How to code Excel to send SMS text message automatically.

I am looking for code to automatically send an sms text message from Excel via Outlook. Thank you very much..
OutlookMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Phil

8/22/2022 - Mon
byundt

Microsoft Excel MVP Ron de Bruin has a number of webpages discussing how to send emails from Excel using VBA. I am guessing you want to send a short message, so try this webpage in his site.

You may wonder why I am blathering about emails when you specifically wanted to send an sms text message. The reason is that Outlook can send an sms as an email provided you know the phone number and cell provider. For example, for an AT&T customer, you would send the sms to 1234567890@txt.att.net Wikipedia has an article that lists the gateways for the major cell service providers.

Regarding your request that the text message be sent automatically--Excel vba is driven by events. If you can define some action that ought to trigger the sms message, then one of Excel's many event subs can probably be used to test for that action, and then to send the sms when it occurs.
Phil

ASKER
Thank you very much Ron, I think I'm almost there. I can handle the VBA part just fine from your first link but I don't understand from the second link how to convert it  to an sms text message. Yes, my messages will be very short and my cell provider is Verizon.
Éric Moreau

Are you using Office 365 as your email host? You can create a distribution list in O365 for which the destination will be a cell phone (so a SMS will be sent).
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Phil

ASKER
Yes, I'm using Office 365. What are the procedures required to create and send the SMS while Excel is running.  I always have outlook running as well.  Thanks!
ASKER CERTIFIED SOLUTION
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Éric Moreau

in fact the distribution list is not required. as byundt said, sending an email to yournumber@vtext.com will work
Phil

ASKER
Unbelievable, this works.  Thank so much!!!!!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.