![]() |
|
|
|
#1
|
||||
|
||||
|
You need a rule and a script. The rule is used to process incoming messages to identify the particular message and then run the script 'SendSMS'. Put the following code in a new module and associate the script with the rule. Change the web address to the valid web address.
Code:
Option Explicit
Private pWebAddress As String
#If Win64 Then
Public Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
#Else
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
#End If
Public Sub NewShell(cmdLine As String, lngWindowHndl As Long)
ShellExecute lngWindowHndl, "open", cmdLine, "", "", 1
lbl_Exit:
Exit Sub
End Sub
Public Sub SendSMS(oItem As MailItem)
pWebAddress = "http://smsxxxxx.info/?user=username&password=password&PhoneNumber=919840098400&Text=TestSMS&Sender=Tester"
Call NewShell(pWebAddress, 3)
lbl_Exit:
Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
| Tags |
| rules, script |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
An html link from Excel works, but now there is too much extra space in the cell
|
njweatherdon | Word | 2 | 09-22-2014 09:06 PM |
VBA trigger for drop down list box in powerpoint
|
CatMan | PowerPoint | 1 | 12-03-2013 10:26 PM |
| Desperatly need help in trigger animations | quinn307 | PowerPoint | 0 | 03-27-2011 08:52 PM |
| Question about Tools>Rules and Alerts>E-mail Rules | RichGuard | Outlook | 0 | 09-02-2010 05:19 PM |
| Can you actually write HTML and CSS in a word document and send it as an html page | jackaroo | Word | 0 | 07-12-2010 07:49 AM |