Results 1 to 2 of 2

embedding user-defined hyperlink into auto-generated email

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    embedding user-defined hyperlink into auto-generated email

    hello, I was wondering how to imbed a hyperlink into the body of an automatically generated email.

    Ideally the hyperlink would be based on a cell value to allow a user to cut and paste a file path

    example filepath
    P:\Project Folder\project worksheet.xls


    Here is the current autoemail VBA code I am using. So the filepath would be taken from
    Sheet: Behind The Scenes D4

    Private Sub SimplifiedEmail_Click()
    Dim myOutlok As Object
    Dim myMailItm As Object
    
    Set otlApp = CreateObject("Outlook.Application")
    Set otlNewMail = otlApp.CreateItem(olMailItem)
    fName = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
    
    With otlNewMail
    .To = Sheets("Behind The Scenes").Range("D2")
    .Subject = Sheets("Behind The Scenes").Range("D3") & " " & Sheets("Behind The Scenes").Range("E3")
    .Body = Sheets("Behind The Scenes").Range("D5") & "     " & Sheets("Behind The Scenes").Range("D6") & Chr(10) & Sheets("Behind The Scenes").Range("D7")
    .Send
    End With
    
    otlApp.Quit
    
    Set otlNewMail = Nothing
    Set otlApp = Nothing
    Set otlAttach = Nothing
    Set otlMess = Nothing
    Set otlNSpace = Nothing
    
    End Sub
    Last edited by kuraitori; 11-20-2008 at 08:14 PM.

Thread Information

Users Browsing this Thread

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

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