Discussion Locked

Any drive letter.

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have clients who like to take collections of imaged documents with them on the road in either PDF or Tif form. I am given an index in Word and create hyperlinks to the image files and then burn it all to CD. A typical hyperlink path looks like this:
D:\foldername\filename.pdf.
I use D: because most CD-ROM drives are D:
A problem arises when a client runs the CD in a drive that is not labeled D: The hyperlink will fail.
I tried assigning a volume label to the CD when I burned it. The hyperlink path looked like this:
volumelabel\foldername\filename.pdf
Well, that failed. Does anyone out there know of a way to create a hyperlink that will work on a CD no matter what the drive letter of the CD-ROM drive on the computer is.
If you needmore info post a question, the e-mail is not valid.

12 replies

by don christner

If the Word document that has the hyperlinks is also burned to the root of the CD, no problem. For the hyperlink path enter it as \foldername\filename.pdf. This tells it to start at the root of whatever drive letter the Word document happens to beon. Finds the folder and then the filename.

Don

by saihib

You're absolutely correct. I actually figured this out before I read any responses to this post. Along the way I learned a lot about absolute and virtual paths in Word. I almost rejected every response until I realized that these points can be applied towards the purchase of a new Porsche. Someone told me what kind of car you drive now and I figured I could helpl

by beermonster

Hi,
I don't know enough about your user base (IE the os's they use etc) to know if this is suitable, but i would do is set an environment variable on your users machines and reference the drive by the variable name. You can automate the process by using vbscript, which will discover which drive is the cd drive and set the variable accordingly (I have some samples that I wrote if you need them - darthurs@hotmail.com ). This would only need to be done once on each machine, but may well need to be done as an admin. So, you set the variable CDDRIVE to the cd drive letter, and your links become -

%cddrive%:\myfolder\mypath

Hope this is a step in the right direction

by saihib

This would be way to complicated for me to implement. I appreciate your effort though.

by gigelul

I agree answer1. I made some tests with a RW CD on different systems with different drive letter asigned to CD-ROM.
\foldername\filename
\foldername\subfoldername\filename
And word file with hyperlinks in root of the CD.

by gigelul

Also you can find additional info for some enhance futures on:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/Shell/programmersguide/shell_basics/shell_basics_extending/autorun/autoplay_cmds.asp

Remove any space from the above url.

by dklippert

Here's some code to play with:

Sub FirstCDRomLetter()
Dim AllDrives
Dim Drive
Dim fs As Object
Const CDROM As Byte = 4

Set fs = CreateObject("Scripting.FileSystemObject")
Set AllDrives = fs.Drives
For Each Drive In AllDrives
If Drive.DriveType = CDROM Then
MsgBox Drive.DriveLetter
Exit Sub
End If
Next
End Sub

Also see these papers:

http://tinyurl.com/13z6

http://tinyurl.com/13z8

by joseph moore

Yes, the preferred way of making HTML links in any HTML document (whether the HTML was made in MS Word, FrontPage, Macromedia HomeSite, or just in a plain text editor), is you make all links use "relative pathing". Don't hard-code in paths like drive letters for full URLs. It is not necessary.

Ok. Here is a sample linking to some relative paths. I made 3 directories in a working folder on my system, FOLDER1, FOLDER2 & FOLDER3. In each folder, I put a different text file in. FILE1.TXT, FILE2.TXT & FILE3.TXT. File1.txt is in FOLDER1, etc. YOu get the point!
In the root of this working folder, I made INDEX.HTM which just has the links to each text file. Here is the linking with the relative pathing:

file1

file2

file3

That is all. When you click the first link, the pathing to INDEX.HTM (the physical disk drive and such) is not needed. The HTML link says to just move into the FOLDER1 directory, that should be at the same level as INDEX.HTM; there will be a file called FILE1.TXT. Open that file in the browser window.

So, check your links in your HTML index doc. Make sure you remove any FILE://D:\FOLDERstyle pathing, and try from my suggestion above.

hope this helps

This discussion is closed to new replies.