Sunday, July 29, 2012

Texting from Excel

I have figured out how to send a text from Excel. It is really sending a POST request to my website using VBA and passing the phone number and message from 2 cells in the spreadsheet. Put the phone number in A2 and the message in B2. Then press Alt F11 to open the VBA code editor. Under Microsoft Excel Object on the left pane open the current spreadsheet. Or you could add the code to a new module by right clicking on Modules and choosing insert module. Next put this code in it.
Private Sub GetWebRequestButton1_Click()
    'get the numbers to send to the website to get a response
    Number = Sheets("texting").Range("A2").Value
    Message = Sheets("texting").Range("B2").Value
    
    'This sends a post to the website and put the response in the range supplied
    With ActiveSheet.QueryTables.Add(Connection:="URL;http://yourwebsite.com/VBAtexting.php", Destination:=Range("C2"))
        .PostText = "sendtext=1&number=" & Number & "&message=" & Message
        .RefreshStyle = xlOverwriteCells
        .SaveData = True
        .Refresh
    End With
End Sub
It works great.
You will also need the code for texting using google voice on your website but it is pretty simple and I use it all the time to send automated texts.

2 comments:

Anonymous said...

Интересно, поподробней желание [url=http://profvesti.ru/o-tekhnologiyakh-stroitelstva/59-karkasnaya-tekhnologiya-stroitelstva.html]смета на ремонт квартиры[/url]

Anonymous said...

If you have no experience to buying something online, maybe you are out the fashion. In the modern life, more and more people like to buy something such as clothes, shoes online. It can save their money, time. At the same time, they can find various fashion things of their love. So, the same as toms shoes. Many Toms online stores are available. You can find any pair of toms shoes with different style, color and size. Importantly, you can get free and fast shipping, quality assurance and low price. Especially, no matter women or mens shoes, all can be found in the online Toms shoes store.Visa[url=http://www.cheaptomsbuy.com]Cheap Toms sale[/url] The Least Collection Of Toms Shoes For You Now Zac Efron [url=http://www.cheaptomssite.com]Cheap Toms Shoes[/url] Women with high-heels generally are believed as beautiful, fashionable and noble. But high-heels don't clothing for every woman. Some humans feel added adequate with flats. Yes, flats can also accomplish women attending blue-blooded and fashionable. Try Toms. [url=http://www.tomsfans.com]Toms Oultet Store[/url] Internet is flooded with several TOMS shoes coupons. You can get these coupons from several websites which include the official website of the company and several other affiliated websites like Amazon and e- bay.
Relate Artcile

[url=http://www.elcongresohemisferico.org/_blog/Hemispheric_Congress/post/Camacol_Magazine/?page=12+Result:+no+post+sending+forms+are+found;]buycomfortable toms women shoes for cheap price[/url]
[url=http://www.makadammen.lu/guestbook2/index.php]orderwonderful toms men shoes for cheap price[/url]