Solved

Adding an Excel  Hyperlink in Outlook with an Excel Macro

Posted on 2011-02-24
3
469 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
  • 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
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…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now