How to send a range of cells in a sms text message by using Visual Basic for Applications in Excel?
BTW: I really need this to work for my job! So any feedback would be greatly welcomed. Please read below to understand what I'm trying to do. I need to be able to send my guys their daily goals via sms text message:
The following works great for sending a range of cells in a email message:
-----------------------------------------------------------------------
In Microsoft Excel, you can send a section of a workbook as an e-mail message. This article contains sample Microsoft Visual Basic for Applications (VBA) code that demonstrates how to automate sending a range of cells in an e-mail message.
The following VBA code sample sends a range of seven cells, B11 through H11, from the currently active workbook to the e-mail address specified in the code:
Sub Send_Range()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("B11:H11").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "E-Mail_Address_Here"
.Item.Subject = "My subject"
.Item.Send
End With
End Sub
----------------------------------------------------
You can also use this same VBA Code for sending a range of cells in a sms text message by replacing "E-Mail_Address_Here" with one of the following:
Sprint SMS Text Message:
phonenumber@messaging.sprintpcs.com
T-Mobile SMS Text Message:
------------------------------------------------------------
Outlook will send the message. Everything is good, NOT!
Ok, this is where my problem begins so please read carefully:
1) It will seem as the message was sent then I get a Message from: Mail Delivery Subsystem
2) Mail Delivery Subsystem lets me know that the message has failed to be sent because it was rejected by the Cell phone carrier because the message size exceeds the size limit.
3) The size of the sent mail message for a range of SEVEN CELLS is 367 KB. This is mainly where my problem begins. The SMS TEXT Message max size limit is 7 KB.
4) There is no reason why this message: "Eric 1 New 4 HS $126 Accys" should exceed 7 KB. This message is 26 characters long and the max character limit for a message 160 characters.
Bookmarks