Solved

Adding an Excel  Hyperlink in Outlook with an Excel Macro

Posted on 2011-02-24
3
478 Views
Last Modified: 2012-05-11
Hi Guys, I am sending a Excel piece of work to my manager which he must approve via e-mail.
He wants a hyperlink to the Excel path in his e-mail so he can see it straight away. I have this code which sends him the e-mail from an Excel button with Voting Buttons but only text appears not a Hyperlink. Any ideas how its done?  
Justin
  With OutMail
            .To = "cscanln@mfglobal.com;"
               
            .VotingOptions = "Approve;Reject"    'you can include what you want in fact

            .CC = ""
            .BCC = ""
            .Subject = "FITR Dailies - "
            .Application.ActiveInspector.CurrentItem.HTMLBody = "G:\Restricted\UKMFG-TS-AM-EUC03\TRES\FITR - P11 Feb'11\FITR Oracle Dailies Feb'11.xlsm"

                  .Display
        End With
'        On Error GoTo 0
0
Comment
Question by:JCutcliffe
[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
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 34972082
Hi, Justin.

You have to format the link as a hyperlink using HTML tags.  Change this line

.Application.ActiveInspector.CurrentItem.HTMLBody = "G:\Restricted\UKMFG-TS-AM-EUC03\TRES\FITR - P11 Feb'11\FITR Oracle Dailies Feb'11.xlsm"

to

.Application.ActiveInspector.CurrentItem.HTMLBody = "<a href=""file://G:\Restricted\UKMFG-TS-AM-EUC03\TRES\FITR - P11 Feb'11\FITR Oracle Dailies Feb'11.xlsm"">Open the spreadsheet</a>"
0
 

Author Comment

by:JCutcliffe
ID: 34997963
Hi I am getting "Run time error '438' Object does not support this property or method" using your code (see below). Any ideas why?

    .To = "canlan@mfglobal.com;"
               
            .VotingOptions = "Approve;Reject"  
                   .Subject = "FITR Dailies - "
            .Body = "G:\Restricted\UKMFG-TS-AM-EUC03\TRES\FITR - P11 Feb'11\FITR Oracle Dailies Feb'11"
          Application.ActiveInspector.CurrentItem.HTMLBody = "<a href=""file://G:\Restricted\UKMFG-TS-AM-EUC03\TRES\FITR - P11 Feb'11\FITR Oracle Dailies Feb'11.xlsm"">Open the spreadsheet</a>"
                  .Display
0
 
LVL 76

Expert Comment

by:David Lee
ID: 35002440
Which line is the error on?
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

739 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