PDA

View Full Version : Solved: Create Email with Hyperlink to Network Folder



feathers212
03-28-2007, 01:18 PM
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:

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


EDIT: email address masked by mvidas

mvidas
03-28-2007, 01:21 PM
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:' . 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."Matt

feathers212
03-29-2007, 04:53 AM
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!

mvidas
03-29-2007, 06:04 AM
Anytime!