Results 1 to 4 of 4

Sms

  1. #1
    hemaazez is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2017
    Posts
    23

    Sms

    dear All
    thank you for your great support
    i have a form in my database to send SMS to any one , i have 2 buttons in the form to send a message ( one for English and one for Arabic ) , i use a program Unicode Converter to convert Arabic language to Unicode
    i need a code to send both English and Arabic via one button without using any program to Convert Arabic to Unicode
    Click image for larger version. 

Name:	Untitled.png 
Views:	19 
Size:	10.8 KB 
ID:	32309
    the code for send the English SMS is
    Private Sub Command4_Click()
    Dim result1w As String
    Dim sampleurl1w As String
    Dim winhttp1w As Object
    Set winhttp1w = CreateObject("winhttp.winhttprequest.5.1")
    Dim w, wt As String
    Me.Texfon.SetFocus
    w = Me.Texfon.Text
    wt = Me.Texsms.Value
    sampleurl1w = "http://smsmisr.com/api/send.aspx?username=×××××××&password=×××××&language =1&sender=IPSP&mobile=" & w & "&message=" & wt & ""
    winhttp1w.Open "get", sampleurl1w, False
    winhttp1w.Send
    result1w = Left(winhttp1w.ResponseText, 63)
    MsgBox result1w
    End Sub


    the code for send Arabic SMS is:
    Private Sub Command7_Click()
    Dim result1w As String
    Dim sampleurl1w As String
    Dim winhttp1w As Object
    Set winhttp1w = CreateObject("winhttp.winhttprequest.5.1")
    Dim w, wt As String
    Me.Texfon.SetFocus
    w = Me.Texfon.Text
    wt = Me.Texsms.Value


    sampleurl1w = "http://smsmisr.com/api/send.aspx?username=××××××&password=×××××&language= 3&sender=IPSP&mobile=" & w & "&message=" & wt & ""
    winhttp1w.Open "get", sampleurl1w, False
    winhttp1w.Send
    result1w = Left(winhttp1w.ResponseText, 63)
    MsgBox result1w
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If the only thing different is the language argument in the url, you could make a function that takes it as an input argument. You'd still need a way to identify which was desired.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    hemaazez is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2017
    Posts
    23
    thank you for your comment
    i use a program Unicode Converter to convert Arabic language to Unicode

  4. #4
    hemaazez is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2017
    Posts
    23
    thank you for your comment
    i use a program Unicode Converter to convert Arabic language to Unicode

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums