Sending SMS from excel VBACURL Equivalent to POST JSON data using VBAHow to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?Is there a way to crack the password on an Excel VBA Project?Redirect from an HTML pageIs it possible to force Excel recognize UTF-8 CSV files automatically?Parsing JSON in Excel VBASend POST data using XMLHttpRequestHow to avoid using Select in Excel VBAFix Protocol with Excel VBAHow do I return the response from an asynchronous call?VBA application on excel
Non-trope happy ending?
Calculating total slots
Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?
It grows, but water kills it
Lowest total scrabble score
How does the math work for Perception checks?
Moving brute-force search to FPGA
Is there an injective, monotonically increasing, strictly concave function from the reals, to the reals?
How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?
Why does a simple loop result in ASYNC_NETWORK_IO waits?
The IT department bottlenecks progress. How should I handle this?
Can disgust be a key component of horror?
Why is so much work done on numerical verification of the Riemann Hypothesis?
Does malloc reserve more space while allocating memory?
Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?
Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset
Yosemite Fire Rings - What to Expect?
Why "had" in "[something] we would have made had we used [something]"?
I'm the sea and the sun
Quoting Keynes in a lecture
What is the highest possible scrabble score for placing a single tile
How to explain what's wrong with this application of the chain rule?
Creepy dinosaur pc game identification
Pre-mixing cryogenic fuels and using only one fuel tank
Sending SMS from excel VBA
CURL Equivalent to POST JSON data using VBAHow to create Excel (.XLS and .XLSX) file in C# without installing Ms Office?Is there a way to crack the password on an Excel VBA Project?Redirect from an HTML pageIs it possible to force Excel recognize UTF-8 CSV files automatically?Parsing JSON in Excel VBASend POST data using XMLHttpRequestHow to avoid using Select in Excel VBAFix Protocol with Excel VBAHow do I return the response from an asynchronous call?VBA application on excel
I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:
POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp
"messages": [
"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"
]
From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.
html excel vba post xmlhttprequest
add a comment |
I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:
POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp
"messages": [
"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"
]
From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.
html excel vba post xmlhttprequest
1
Check this
– omegastripes
Mar 7 at 7:55
add a comment |
I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:
POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp
"messages": [
"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"
]
From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.
html excel vba post xmlhttprequest
I have an a excel file with VBA in it already. What I want to do now is using VBA and integrating with what I have already got is to send SMS.I have contacted them where I got the sample code from but I didn't expect much help from them because they didn't know what VBA is.
Here is their sample code:
POST /v1/messages HTTP/1.1
Host: api.messagemedia.com
Accept: application/json
Content-Type: application/json
Authorization: Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp
"messages": [
"content": "Hello World",
"destination_number": "+61491570156",
"format": "SMS"
]
From within VBA of course I want to be able to programmaticly change the destination number and the content. At this point I really don't know where to start.
html excel vba post xmlhttprequest
html excel vba post xmlhttprequest
edited Mar 7 at 9:55
omegastripes
8,53422158
8,53422158
asked Mar 7 at 6:33
Phil APhil A
343
343
1
Check this
– omegastripes
Mar 7 at 7:55
add a comment |
1
Check this
– omegastripes
Mar 7 at 7:55
1
1
Check this
– omegastripes
Mar 7 at 7:55
Check this
– omegastripes
Mar 7 at 7:55
add a comment |
1 Answer
1
active
oldest
votes
Here is the basic sample, which should make an HTTP POST request with the specified parameters:
Sub Test()
Dim oXHR As Object
Dim sPayload As String
sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""
Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With
End Sub
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55037447%2fsending-sms-from-excel-vba%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is the basic sample, which should make an HTTP POST request with the specified parameters:
Sub Test()
Dim oXHR As Object
Dim sPayload As String
sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""
Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With
End Sub
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
add a comment |
Here is the basic sample, which should make an HTTP POST request with the specified parameters:
Sub Test()
Dim oXHR As Object
Dim sPayload As String
sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""
Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With
End Sub
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
add a comment |
Here is the basic sample, which should make an HTTP POST request with the specified parameters:
Sub Test()
Dim oXHR As Object
Dim sPayload As String
sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""
Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With
End Sub
Here is the basic sample, which should make an HTTP POST request with the specified parameters:
Sub Test()
Dim oXHR As Object
Dim sPayload As String
sPayload = _
"" & vbCrLf & _
"""messages"": [" & vbCrLf & vbCrLf & vbCrLf & _
"" & vbCrLf & _
" ""content"": ""Hello World""," & vbCrLf & _
" ""destination_number"": ""+61491570156""," & vbCrLf & _
" ""format"": ""SMS""" & vbCrLf & _
" " & vbCrLf & _
" ]" & vbCrLf & _
""
Set oXHR = CreateObject("MSXML2.XMLHTTP")
With oXHR
.Open "POST", "https://api.messagemedia.com/v1/messages", False
.SetRequestHeader "Host", "api.messagemedia.com"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Authorization", "Basic dGhpc2lzYWtleTp0aGlzaXNhc2VjcmV0Zm9ybW1iYXNpY2F1dGhyZXN0YXBp"
.Send (sPayload)
Debug.Print .ResponseText
End With
End Sub
answered Mar 7 at 8:15
omegastripesomegastripes
8,53422158
8,53422158
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
add a comment |
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
Awesome thanks for that. Only need to get the authorization to work.
– Phil A
Mar 8 at 21:53
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
@PhilA Modify Authorization header setting as shown in this answer.
– omegastripes
Mar 9 at 9:47
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55037447%2fsending-sms-from-excel-vba%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Check this
– omegastripes
Mar 7 at 7:55