Solved

Inserting Hyperlink into Custom Outlook Form by EndUser

Posted on 2009-04-03
6
442 Views
Last Modified: 2013-12-26
I have an outlook form with multiple text boxes.  I need the end user that uses this form to be able to insert a hyperlink to a file on the network.  Is there a way to enable hyperlinking on a text box in a Custom Outlook Form.
0
Comment
Question by:commeng
[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
  • 3
  • 2
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24059557
Hi, commeng.  

There's no way I know of to get a hyperlink to behave as a hyperlink in a textbox.  If the textbox will only contain the hyperlink string, then you can add a command button next to the textbox and use its click event to launch the URL in the textbox.  
0
 

Author Comment

by:commeng
ID: 24059592
OK, how would I write the code for the command button?
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24060047
This will do it.  The code assumes that the name of the command button is "CommandButton1".
Function CommandButton1_Click()
    Dim objPage, objControl, varValue, objShell
    'Change the page name on the next line'
    Set objPage = Item.GetInspector.ModifiedFormPages("P.2")
    'Change the control name on the next line'
    Set objControl = objPage.Controls("TextBox1")
    varValue = objControl.Value
    If varValue <> "" Then
        Set objShell = CreateObject("WScript.Shell")
        objShell.Exec "explorer.exe " & varValue
    End If
    Set objPage = Nothing
    Set objControl = Nothing
    Set objShell = Nothing
End Function

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Closing Comment

by:commeng
ID: 31566219
I was so close to having that on my own.  :D  I was doing a Sub not a Function, guess I will know for next time.  Thank you so much!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24060157
You're welcome.  Glad I could help out.
0
 
LVL 12

Expert Comment

by:Hairbrush
ID: 24060171
Instead of the normal text box you could try using a Rich Text Box.  This page has a control that you could use that is based on a rich text box but with clickable hyperlinks: http://www.martin2k.co.uk/vb6/tips/vb_39.php

(Once you have registered the control, in the forms designer In the toolbox, right click and select Custom Controls, then scroll down the list to select the control.)
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
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: …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

617 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