Consulting

Results 1 to 4 of 4

Thread: Solved: Create Email with Hyperlink to Network Folder

  1. #1

    Solved: Create Email with Hyperlink to Network Folder

    I have an excel file that gets saved in a folder. When a user clicks a button, an email is sent with the following information. How do I make it so the “Verification Needed” portion of the body acts as a hyperlink to the following network folder?

    V:\press\Forum\Count Control\Pull Tickets\Verification Needed\

    Here is my code:
    [vba]
    Set WB = ActiveWorkbook
    FileName = "Pressroom Pulled Job.xls"

    ChDrive "V"
    ChDir "V:\press\Forum\Count Control\Pull Tickets\Verification Needed\"
    WB.SaveAs FileName
    WB.Close SaveChanges:=False

    'Create and show the outlook mail item
    Set oApp = CreateObject("Outlook.Application")
    Set oMail = oApp.CreateItem(0)
    With oMail
    .To = "hello.world@domain.com"
    '.CC = ""
    .Subject = "Verify Pressroom Pulled Job Counts"
    . Body = "A pull ticket has been submitted. Please check the Verification Needed folder.”
    .Display
    End With
    [/vba]

    EDIT: email address masked by mvidas

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hi feathers,

    First, you might want to make sure that everyone's V drive is the mapped the same. You may want to use the network address instead of mapped drive, just to be safe. Here is your code using the V, substitute the network path if needed:[vba]' . Body = "A pull ticket has been submitted. Please check the Verification Needed folder.”
    .HTMLBody = "A pull ticket has been submitted. Please check the <a href=""V:\press\Forum\Count Control\Pull Tickets\Verification Needed\"">Verification Needed</a> folder."[/vba]Matt

  3. #3
    Thanks Matt. I had tried that coding earlier, but it didn't work because I didn't have double quotes around the folder address. Thanks for helping me straighten it out!

  4. #4
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Anytime!

Posting Permissions

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