Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-15-2015, 07:25 AM
kitcha321 kitcha321 is offline How to trigger a html link using rules. Windows 7 64bit How to trigger a html link using rules. Office 2013
Novice
How to trigger a html link using rules.
 
Join Date: Jun 2015
Posts: 1
kitcha321 is on a distinguished road
Default How to trigger a html link using rules.

Hi All

I have a html link when triggered we will receive a sms. I need this html link to be executed in outlook using rules when i receive a specific email.

Help me with the procedure or a way to execute this action when i receive a email.



How this link works ?
Just paste the link in a browser and hit enter will be fine. Below is just sample and will not work.

http://smsxxxxx.info/?user=username&...&Sender=Tester
Reply With Quote
  #2  
Old 06-15-2015, 09:17 PM
gmayor's Avatar
gmayor gmayor is offline How to trigger a html link using rules. Windows 7 64bit How to trigger a html link using rules. Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,105
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
Reply

Tags
rules, script



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to trigger a html link using rules. 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
How to trigger a html link using rules. 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft