+ Reply to Thread
Results 1 to 2 of 2

Insert hyperlink in an e-mail body

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Naples, Italy
    MS-Off Ver
    Excel 2003
    Posts
    5

    Insert hyperlink in an e-mail body

    Hello everybody. I have an hyperlink saved in a excel (2010) file in cell B125 that carries the whole path where the file is saved and its name (i.e. P\financial management\read-write\FLA\N3319115CCHA090.xlsm\) I am trying to insert (or paste) this hyperlink an an e-mail. I tried this code here below but all I get is the string of the file path but not an hyperlink. Can somebody save me???

    Sub gotomail()
    '
    ' gotomail Macro
    ' Macro recorded 07/09/2015 by Leandro.Fernandez.IT
    '

    Dim OutApp As Object
    Dim OutMail As Object
    Dim htmlstrbody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    htmlstrbody = Range("b125:B125").Value

    On Error Resume Next
    With OutMail
    .To = Range("A66:A66").Value
    .CC = ""
    .BCC = ""
    .Subject = Range("B123:B123").Value
    .body = Range("b125:B125").Value
    .Display 'or use .Send
    .Send
    End With
    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing

    End Sub

  2. #2
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    276

    Re: Insert hyperlink in an e-mail body

    this should be what you're looking for; however the reciver needs to have the same P:\ mapped that you do.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code to insert stationary in mail body
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-05-2013, 11:39 AM
  2. Help needed to insert the Image on Body of the mail
    By gvreddyhr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2012, 04:30 PM
  3. Replies: 4
    Last Post: 10-25-2012, 09:40 PM
  4. Insert a picture (not as attachment) in to the body of the mail
    By johnjohns in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2011, 02:07 AM
  5. Insert text in body of e-mail form
    By LilyMarie in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 03-16-2009, 11:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1