PDA

View Full Version : Solved: Full Path Not Showing in Hyperlink



Staticbob
08-10-2004, 03:01 PM
Evening all,

I'm using Outlook 2K, and Excel 2K. I am auto generating messages and sending from Excel and almost everything is sweet.

My only problem is this. In the body of the message I have the network path of a document, for example . .

\\Btd2mbr22\Home\staticbob\Site (file://\Btd2mbr22HomestaticbobSite) Workbook testfile\03.00 Site Recs\03.10 (A) CVIs and Reg\

. . . and the problem I have is seen there ! Is there anyway to ensure that the hyperlink formatting is active for the entire path, not just to the first space ?!!

Hopefully, there is something I can do to the format of the string I am using in excel to sort this, rather that Outlook settings !

Thanks in advance !
Bob

jamescol
08-10-2004, 03:26 PM
Hi Bob,
This issue trips up a lot of folks - the fix is easy. Just enclose your URL with < > symbols. Office apps treat everything between these symbols as a URL. In your case:

<\\Btd2mbr22\Home\staticbob\Site Workbook testfile\03.00 Site Recs\03.10 (A) CVIs and Reg\>


Cheers,
James

Staticbob
08-11-2004, 01:02 AM
Thanks James,

I've tried that mate and it still doesn't seem to work, Outlook actually shows the <> but with no formatting ?

I have posted the relevant part of my Excel code below, the var "savepath" is passed into this code, and is just a reference to a cell containing the document UNC path. (as example in OP)

Perhaps I am better to add a shortcut to this file rather than adding a text hyperlink ? I believe that all that I need to do is add attachment by ref, but am not sure of the syntax ?

Thanks in advance,
Bob

'Get info and send mail
With safeitem.Item
.subject = Worksheets("directory").Range("B3").Value & " - Workbook Notification"
.Body = "This message has been generated automatically." & vbNewLine & vbNewLine & _
"A new " & docname & " has been created in this location. Please click the link to view . . ." & vbNewLine & vbNewLine & _
savepath
End With

safeitem.send
Set mi = Nothing
If Created Then appOutlook.Quit
Set appOutlook = Nothing
End Sub

jamescol
08-11-2004, 08:23 AM
Bob,
A couple of questions:

What email editor are you using for Outlook - Word, RTF, HTML, Plain Text?
At what service pack level is your Office 2000?

Thanks,
James

Staticbob
08-11-2004, 08:59 AM
James,

I'm on HTML editor for Outlook. I'm now running 2003, but this was still the same case in 2000 and all of my users are on 2000 SP4 We need to stay with HTML editor as we have fancy signatures)

I think the shortcut attachment would be best thinking about it . . .

Cheers
Bob

Anne Troy
08-11-2004, 12:49 PM
Take the spaces out.

Staticbob
08-12-2004, 02:52 AM
Thanks Guys,

I have sorted it. the last line of code for the body of my text now reads . .

"<" & savepath & ">"

And it all works well.

Thanks
Bob

jamescol
08-12-2004, 08:28 AM
Bob,
Glad you got it working!

James

Staticbob
08-16-2004, 07:03 AM
James,

This only works if I have Mail Format set to Rich Text in Outlook, if I have it set to HTML this doesn't show. Can you think of any other solution ?

What code do I need to add a shortcut attachment to the message ???

Thanks
Bob