Hyperlink not showing complete file path

G

Guest

Hi,

I have developed a VBA code which attaches the file which in present in a
cell...by taking its value like this
Column D
E:\Safi\acb.xls
but the hyperlink is used to get the full file path name to be
attached...this works great..when the file is in drives D:, and so on....
other than the files in C: drive

Example if I Pick a file through Hyperlink from a desktop or my documents

it is showing like this..

...\server\my documents\abc.xls

but i want to have the complete file path name as it was in D,E,F drive.....

as it is not attaching the file if i pick the file from C: drive..

Thanks in advance.
Safi.
 
G

Guest

To force the display of the full URL address enter the links as:

file:///E:\Safi\abc.xls
rather than
E:\Safi\abc.xls

Same for server addresses that have not been maped to a Drive letter
 
G

Guest

Hi Gary,

I am not typing the file path in the cell but i am taking the help of the
Hyperlink menu item from Insert. The path is displayed by hyperlink only...it
works gr8 if the file is from other Drive rather than C drive...means if I
pick any file with the Insert Hyperlink which is from C: Drive the cell
values like

...\My Documents and Settings\Desktop\abc.xls

the two dots in the begining spoils my code it never recongies it and hence
not attaching file...Hope u can see it personally then reply me...

Insert > Hyperlink >

text to display : you will see if click any file which resides in c drive

hope u are not frustuated...

regards,
safi.
 
G

Guest

No frustration on my side. The advantage to using the Insert Hyperlink
Wizard is that you don't have to type in the entire file URL. This
disadvantage is that you cannot control the displayed information as
precisely as you may need. No one wants to have to type in:

file:///C:\Documents and Settings\Owner\Desktop\Book2.xls#Sheet2!B9
or
file:///\\FINANCE\Statements\1stqtr.xls

But doing the typing or using the HYPERLINK() function will always get you a
nice "click-able" link that can be referenced elsewhere on your worksheet or
within VBA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top