Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 459
  • Last Modified:

How best to Send to web page and process the result with Access

Hi,

I have used the methods 'followhyperlink' and acCmdOpenHyperLink to launch web pages for user interaction, but now I have the following problem and need so guidance on how best to achieve the result.

I want to use the SMSGlobal facilities to send SMS messages from an Access 2010 app. It is easy enough to construct the http command with signin, password, tomobile etc. The result lauches the website as a blank page and returns a one line result/error message.

I would like to send the link and receive the result from the page back into my application without showing on the users screen the actual webpage interaction how can this be best achieved?
0
ynot8669
Asked:
ynot8669
  • 2
1 Solution
 
ynot8669OwnerAuthor Commented:
The web page result looks like this:
<html><head><META content="IE=5.0000" http-equiv="X-UA-Compatible"></head><body>OK: 0; Sent queued message ID: 2045e550e7356343 SMSGlobalMsgID:6666903908584126
</body></html>

So I need help with DOM in vba to extract the body text only
0
 
ynot8669OwnerAuthor Commented:
Solved it before getting an answer via:

Function Testit()
 Dim text As String
 text = GetHTML("http://www.smsglobal.com/http-api.php?action=sendsms&user=xxxxxxxx&password=xxxxxxxx&&from=61999999999&to=6188888888text=Hello%20world")
 MsgBox text
End Function

Function GetHTML(sURL)
 ' Create an xmlhttp object:
 With CreateObject("Microsoft.XMLHTTP")
   .Open "GET", sURL, False
   .Send
  GetHTML = .responseTEXT
End With
End Function
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now