+ Reply to Thread
Results 1 to 16 of 16

How to send a range of cells in a sms text message by using VB -Applications in Excel

  1. #1
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    How to send a range of cells in a sms text message by using VB -Applications in Excel

    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:

    Please Login or Register  to view this content.
    ----------------------------------------------------

    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:
    Please Login or Register  to view this content.
    T-Mobile SMS Text Message:
    Please Login or Register  to view this content.
    ------------------------------------------------------------
    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.

  2. #2
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    5) After viewing the source code of the automated message [inside the body of the sent email message] of the script, I found out why it is 367 KB long: [.txt file attached inside .zip]


    Which brings me to my GRAND QUESTION: Is there a piece of code/line that I can put in the original VBA Code to shorten the output of the body message/source code?

    DOES THIS MAKE ANY SENCE?
    Attached Files Attached Files

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Hello g00glethis1,

    Welcome to the Forum!

    To do this requires that you have the Outlook SMS Add-in installed on your system. If you don't you can download it from Microsoft here. There is a limit on the message size, which is 160 characters per message.

    Excel can send emails through Outlook. As far as I know, the method you are using is not capable of accessing the SMS Addi-in code. It will send an email but SMS requires different protocols and needs specific software to send the messages.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    This may help reduce the size of the message: Is there a way I can insert a line in ActiveSheet.MailEnvelope to send it as Plain Text & Not as HTML?

  5. #5
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    I give up!

    It won't deliver the message because the message is to large in size because Microsoft puts alot off unnecessary excess coding in HTML Email source code being sent out.

    Microsoft has found away to screw me over again!
    Last edited by shg; 09-06-2009 at 05:09 PM. Reason: delet spurious quote

  6. #6
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    You can send yourself a SMS Text Message VIA Email, it is really easy. Who is your Cell Phone provider?

    Do it yourself so I can prove my point:

    Verizon: [email protected]
    AT&T: [email protected]
    Sprint: [email protected]
    T-Mobile: [email protected]
    Nextel: [email protected]
    Cingular: [email protected]
    Virgin Mobile: [email protected]
    Alltel: [email protected]
    CellularOne: [email protected]
    Omnipoint: [email protected]
    Qwest: [email protected]
    Last edited by shg; 09-06-2009 at 05:09 PM. Reason: delete spurious quote

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    G00gle, please don't quote whole threads -- it's just clutter.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Hello g00glethis1,

    The method you are using calls your default email client, which may or may not be Outlook. Using Outlook to send your email allows either HTML or Text. This is why I mentioned using Outlook the first time. You must have the Add-In installed. This is not a standard software component for Windows 2003 or 2007. If you provide me with a copy of your workbook, I can help you more easily.

  9. #9
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Leith Ross,

    I am saying you can send your self a SMS Text Message via Email regardless of your Email Client.

  10. #10
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Try it. Who is Your Cell Phone Provider?

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    No doubt; I text my wife and kids via email frequently.

    That's not what Leith is saying.

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Hello g00glethis1,

    Until you move past this fixation with proving me wrong, you will be no closer to an answer than when you started. If you have a problem with coding, you need to provide clear examples of what you have and what you expect the results to be.

  13. #13
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Leth Ross,

    I am not trying to prove anybody wrong. I was hoping you would be able to help me.

    All I need to be able to do is send my guys their daily goals via sms text message. We have a spreadsheet that is updated daily.

    I want to be able to click a command button on the excel spreadsheet then our guys will be to receive that information on their phone so they know what their goals are for that day.

    I was getting frustrated because I have fell I am so close to getting it right and so far away at the same time. I have been researching on a solution for so long and can't find my answer. I was hoping one of you guys would be able to assist me in providing the missing piece of code that I need to fix this issue.

  14. #14
    Registered User
    Join Date
    09-06-2009
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    I forgot to mention our work computers do not allow us to download any .exe so I won't be able to use that add on feature,

    So I'm saying it has to all be done by code via VBA.

  15. #15
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Hello g00glethis1,

    Unless you or your company has this Add-In installed, there is no way to use the SMS feature with email. As I stated earlier, this is not a standard Windows feature. The Add-In provides the necessary code to link the email to the SMS protocols based on whoever the carrier is. It also provides VBA with the functions needed to access the SMS object. Without the correct software installed, it won't work. If you can send yourself text message from your email then the Add-In is present.
    Last edited by Leith Ross; 09-06-2009 at 06:20 PM.

  16. #16
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to send a range of cells in a sms text message by using VB -Applications in E

    Hello ,

    Here is the code for Excel to send an email through Outlook. You need to fill the blanks for what you need. Place this code in a standard VBA module.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1