• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 484
  • Last Modified:

Outlook - Add a button to an Email Message

Hi..
Is there any way to Add a button to an outlook message that when clicked will launch a local app?
I know you can add a HTML button.. but how do you add a handler.
thx
0
JElster
Asked:
JElster
  • 3
  • 2
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
Won't work unfortunately as email programs run in a sandbox and opening local programs will be blocked.
0
 
JElsterAuthor Commented:
Add hyperlink in email that goes to another page that runs this


<html>
02
  <head>
03
    <script language="javascript">
04
      function LaunchApp(appPath)
05
      {
06
        try
07
        {
08
          <!-- Launch application -->
09
          WSH = new ActiveXObject("WScript.Shell");
10
          WSH.run(appPath);
11
        }
12
        catch (ex)
13
        {
14
           errMsg = "An error occured while lauching the application.\n\n";
15
           alert(errMsg);
16
        }
17
        <!-- Close window -->
18
        window.open('', '_self', '');
19
        window.close();
20
      }
21
    </script>
22
</head>
23
  <body onLoad="LaunchApp('C:\\windows\\system32\\notepad.exe')">
24
  </body>
25
</html>
0
 
David Johnson, CD, MVPOwnerCommented:
It only works with internet explorer if the user allows the active-x control
0
 
JElsterAuthor Commented:
right
0
 
JElsterAuthor Commented:
Figured it out myself
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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