+ Reply to Thread
Results 1 to 4 of 4

Macro to make hyperlink in e-mail

  1. #1
    Registered User
    Join Date
    04-12-2005
    Posts
    3

    Macro to make hyperlink in e-mail

    Hi,
    I am working on a project w/someone at work & we have the following code written to send an email :

    MaximizeWorkbook
    FileSave
    Dim OutApp As Outlook.Application
    Dim OutMail As Outlook.MailItem
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(olMailItem)
    With OutMail
    .To = "Consumer Approval Officers"
    .CC = ""
    .BCC = ""
    .Subject = Sheets("Loan Setup Sheet").Range("AA12")
    .Body = ""
    .Attachments. = ""
    .Display
    End With
    Set OutMail = Nothing
    Set OutApp = Nothing
    End Sub

    We want to insert a hyperlink to S:\Consumer\ in the body of the email. This will allow the receiver of the email to be able to click on the hyperlink and open up to this directory.

    Can anyone help?

  2. #2
    Registered User
    Join Date
    04-12-2005
    Posts
    3
    Isn't there a way to put the keystrokes into the macro, instead of attachment?

  3. #3
    Forum Contributor
    Join Date
    12-11-2004
    MS-Off Ver
    2007
    Posts
    137
    Hello

    if you want to insert a link to a directory in the body of the mail , you may try

    ...
    .Body = "file://S:/Consumer"
    ...


    you add "file://" before the directory name
    replace \ with / in the directory
    if you have spaces in the directory name , replace space with %20

    another example

    .Body = "file://C:/Documents%20and%20Settings/michel"


    regards ,
    michel

  4. #4
    Registered User
    Join Date
    04-12-2005
    Posts
    3
    Thanks Mike,
    Exactly what I was looking for. (after i read your reply, I just sat back and said "DUH!")

+ Reply to Thread

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