Results 1 to 3 of 3

Thread: How to setup hyperlink of file name and path through Excel via VBA

  1. #1
    Join Date
    Oct 2011
    Posts
    74

    How to setup hyperlink of file name and path through Excel via VBA

    I am trying to send a link to a user with a hyperlink to the file I am working on via a button. I know how to create a hyperlink but I can only put it in a range. I can not store it as a variable to be transferred to the outlook mail. Any ideas on how to send mail with vba and have the Body be a hyperlink to the file that I am sending it from. Thanks

  2. #2
    Join Date
    Oct 2011
    Posts
    74

    Re: How to setup hyperlink of file name and path through Excel via VBA

    I have found how to put it in the Hyperlink of the file. Now I need to know how to add a routing slip to this email. Any help will be greatly appreciated. Code Below :
    Code:
    Sub CreateEmail()
    
    Dim rcp, hlink, msg, subj
    rcp = "
    subj = "Please review this file"
    msg = "Please review file located at: " & _
    "%0A%0A" & "<file://" & ThisWorkbook.FullName & ">"
    hlink = "mailto:" & rcp & "?"
    hlink = hlink & "subject=" & subj & "&"
    hlink = hlink & "body=" & msg
    ActiveWorkbook.FollowHyperlink (hlink)
    End Sub

  3. #3
    Join Date
    Nov 2010
    Posts
    503

    Re: How to setup hyperlink of file name and path through Excel via VBA

    You have two choices for this.
    • First, if you use a mapped network drive like I:\ the two PC's must have the drive mapped exactly the same. You can check the mapping by going to a windows Explorer and going to Tools menu - disconnect Network Drive. Don't just disconnect but the window will give the Full Map name of the drive.
    • Second instead of using a mapped drive name (I:\) use a network name that starts with two backslashes. (\\mycompanydrive\....).

Similar Threads

  1. Hyperlink not working in Excel 2007
    By Technocrat52 in forum Windows Software
    Replies: 4
    Last Post: 28-03-2012, 12:24 PM
  2. Want to hyperlink only one word in a cell of Excel
    By Iyyappan in forum MS Office Support
    Replies: 2
    Last Post: 23-02-2012, 07:24 PM
  3. Replies: 2
    Last Post: 21-01-2012, 04:49 PM
  4. How to see full file path in Microsoft Excel 2003
    By Eas!war in forum MS Office Support
    Replies: 2
    Last Post: 21-01-2012, 02:15 PM
  5. why hyperlink not working on Excel?
    By Chheda in forum Windows Software
    Replies: 4
    Last Post: 04-01-2012, 08:32 PM

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
  •  
Page generated in 1,713,906,903.01578 seconds with 18 queries