Solved

Follow HyperLink Event In Outlook?

Posted on 2009-04-09
10
503 Views
Last Modified: 2012-05-06
When an email has hyperlinks, I don't necessarily want Outlook to open them in my Windows default browser.  I want to decide on click which browser to use.  Are there any events I could use to trap this action before the link is followed?

Mike
0
Comment
Question by:shacho
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 500 total points
ID: 24113063
Hi, shacho.

There aren't any events in the Outlook object model for trapping a hyperlink click.  Perhaps there something in the operating system, a Windows API event or something like that.  Why wouldn't you want the hyperlink target to open in the default browser?
0
 

Author Comment

by:shacho
ID: 24128195
Internal sites will not work on any other browser than IE.  I worked out a different solution, which is even better as it is system wide.
In case you're interested:

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24316238.html

Mike

0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24128670
Mike,

Good solution.  Thanks for sharing it.  I can produce a compiled version of the script that won't generate a window if that'd help.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:shacho
ID: 24128825
Great idea!  Better still, can you tell me how to do it?  I have access to Visual Studio .Net.


0
 

Author Comment

by:shacho
ID: 24128899
-Reopen-
0
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 500 total points
ID: 24133224
This works for me.  This is a console application.
Module Module1
 
    Sub Main(ByVal arrArgs As String())
        Dim varArg As String
        If UBound(arrArgs) = 0 Then
            varArg = arrArgs(0)
            'Change company.com on the next line to the unique test to look for in the URL'
            If InStr(LCase(varArg), "company.com", CompareMethod.Text) Then
                System.Diagnostics.Process.Start("C:\Program Files\Internet Explorer\iexplore.exe", varArg)
            Else
                System.Diagnostics.Process.Start("C:\Program Files\Mozilla Firefox\Firefox.exe", varArg)
            End If
        End If
    End Sub
 
End Module

Open in new window

0
 

Author Comment

by:shacho
ID: 24133988
Most excellent.  Is there anyway to prevent the half second flash of the shell window from appearing on execution?
0
 

Author Comment

by:shacho
ID: 24134002
Should I rebuild it as a Windows application?
0
 

Author Comment

by:shacho
ID: 24134014
Just tried it - works great!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24134052
Cool!
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question