Hyperlnk to a cd-rom folder

How but a exel file that has hyper links to the folders on that cd rom with out naming a drive letter since everyone has a different drive letter for their cd rom???

Thanks
0
Ginger (20)
7/21/2004 4:53:01 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
260 Views

Similar Articles

[PageSpeed] 34

The excel workbook is stored on that same CD?

If yes, this worked ok for me in xl2002 and using my harddrive (not CDROM).

File|properties
Hyperlink Base:
\
(just the backslash)

Then I could insert hyperlinks via Insert|Hyperlink and just leave the drive
letter off.

If the workbook is not on the same cd, you could have a file on the cd to look
for, search the CDdrives and determine the drive letter.  Then have your macro
loop through your hyperlinks and change the drive letter.

This picked out the CDDrive with the file "readme.txt" in the root directory.

Option Explicit
Sub auto_open()

'    Dim FSO As Scripting.FileSystemObject
'    Dim myDrive As Scripting.Drive
    Dim FSO As Object
    Dim myDrive As Object
    
    Dim myDriveLetters() As String
    Dim myDriveLetter As String
    Dim dCtr As Long
    Dim iCtr As Long
    Dim resp As Long
    
    Dim TestStr As String
    
    'Set FSO = New Scripting.FileSystemObject
    Set FSO = CreateObject("scripting.filesystemobject")
    
    dCtr = 0
    For Each myDrive In FSO.Drives
        'If myDrive.drivetype = CDRom Then
        If myDrive.drivetype = 4 Then
            dCtr = dCtr + 1
            ReDim Preserve myDriveLetters(1 To dCtr)
            myDriveLetters(dCtr) = myDrive.DriveLetter
        End If
    Next myDrive
    
    If dCtr = 0 Then
        MsgBox "Couldn't find the CDROM Drive--quitting!"
        MsgBox "ThisWorkbook.Close savechanges:=False"
        Exit Sub
    End If
    
    myDriveLetter = ""
    Do
        For iCtr = LBound(myDriveLetters) To UBound(myDriveLetters)
            'I wanted to use this, but it tried to access my
            'CDROM with nothing in it
            'If FSO.Drives(myDriveLetters(iCtr)).IsReady Then
            
            'so I used this.
            TestStr = ""
            On Error Resume Next
            TestStr = Dir(myDriveLetters(iCtr) & ":\readme.txt")
            On Error GoTo 0
            If TestStr = "" Then
                'do nothing
            Else
                myDriveLetter = myDriveLetters(iCtr)
                Exit For
            End If
        Next iCtr

        If myDriveLetter <> "" Then
            'found it
            Exit Do
        Else
            resp = MsgBox(prompt:="Put in the CDROM or Cancel", _
                       Buttons:=vbOKCancel)
            If resp = vbCancel Then
                MsgBox "ThisWorkbook.Close savechanges:=False"
                Exit Sub
            End If
        End If
    Loop
    
    'now do something to point at the link using that drive letter.    
    MsgBox myDriveLetter
    
End Sub


Those lines that look like:
MsgBox "ThisWorkbook.Close savechanges:=False"

should really look like:
ThisWorkbook.Close savechanges:=False

But it's a pain to have the workbook close without saving during testing!

(I read your message incorrectly the first time.  But since I did all that
!%!@#ing work, I'm gonna post it!)



Ginger wrote:
> 
> How but a exel file that has hyper links to the folders on that cd rom with out naming a drive letter since everyone has a different drive letter for their cd rom???
> 
> Thanks

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
7/22/2004 12:43:58 AM
Reply:

Similar Artilces:

Track items in non-default Outlook folders
It is important to be able to "Track in CRM" Outlook items from non-default outlook folders. Some users (assistants to managers) have access to the Outlook calendar and Mailbox of the manager in order to schedule appointments and send email on behalf of the manager. They are currently unable to create any CRM outlook items on behalf of the manager as only their own outlook profile (and their default calendar) supports tracking in CRM (in CRM3.0). They do not use CRM appointment and email funcitonality from the CRM forms (outside of Outlook folders) due to the fact that you...

Unable to load files from alternate startup folder
Windows SBS 2003 Windows XP Office 2003 Dell Optiplex GX260 We are a small CPA firm running, seemingly, identical set-ups on 6 identical workstations. We load a system.xls file from a network folder (R:\Firm\system\excel\xlstart) when Excel starts through the 'At startup, open all files in:' setting in the Options|general tab. We've been loading this file successfully through multiple versions of Excel over the last 5+ years. On two of the workstations, the files in this folder have stopped loading. Additionally, we are unable to create icons to execute any of the macros in the ...

Unable to save query to shared folder in Business Portal
In Business Portal, when I go to queries, I can see the different queries under shared folder. I can also see my Queries folder. I tried to create a new query and saved it. It is getting saved into my Query folder. I am not able to save any new queries inside the shared folder. Jack, Thanks for using the newsgroups, You must be an administrator to move a query to the shared queries folder. If you are, follow these steps: 1. Go to Site Settings > Portal Elements > Organize Queries 2. Navigate to a page (For example, Query Pages > Financial if you wish to add a shared query t...

Why does priv1.edb increase in size when public folders are replicated?
We have an Exchange 2000 server on one Windows 2000 Server computer and Exchange 2003 on a different Windows 2003 server computer. We noticed that once we turned on replication for the public folders, the pub1.edb file increases in size, as does priv1.edb. There are no other mailboxes in priv1, so that doesn't account for the size increase. If we dismount priv1.edb, we can run eseutil /d and compact it to decrease the size. What you are seeing is normal behavior from my experience. When bringing up dedicated public folder servers, I've seen the mailbox store to grow to be quite...

how do i stop items auto going into spamkiller folder in outlook
eveytime new details come into the inbox most get moved into the spamkiller folder automatically - how do i stop this? are you using a 3rd party spam filter? if so, you'll need to reconfigure it so it doesn't mark all mail as spam. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solution...

sharing Task/Contacts folder in Outlook 2003
The Outlook 2000 invitation to share a task or contacts folder, does not appear with the accept and decline options in Outlook 2003, as it does on other Outlook 2000 clients. Is there someway to make this work in Outlook 2003?? Thanks, -SG Net Folders, buggy application that it was, was discontinued in Outlook 2002 and later versions. See if any of the solutions offered here help: http://www.slipstick.com/outlook/share.htm --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent t...

Unable to move email from Inbox to Archive Folder
I get the message "Can't move the items. The item could not be moved. It was either already moved or deleted or access was denied" when I try to move emails from Inbox to an archive folder. I am using Outlook 2000 Corporate Any assistance to get over this issue is appreciated. Regards, Agnel How big is the archive file and how many items are in the folder you're trying to move the item to? (You might also want to answer those questions about your main .PST file and the Inbox folder...) -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be...

Windows Mail
After about 5 or 10 minutes in Windows Mail, the folders disappear and I have the message "Folders could not be displayed - Windows Mail could not open this folder. Possible causes are:&nbsp; Low disk space.&nbsp; Low memory". My desktop gadgets show CPU at 20% and memory at 50%.&nbsp; I have quite a&nbsp;few filters on the Inbox.&nbsp; Are these likely to be the cause ?The only way to get them back seems to be a reboot . . .&nbsp; until the next time . . . &nbsp; Post Originated from http://www.VistaForums.com Vista Support Forums Which antivirus a...

Change the Default Working Folder
How do I change the "default working folder" in Publisher 2007? The default "default working folder" is My Documents and I would like to use a different one. You don't... Hopefully this will be addressed in a future service pack. You can place a default address in "My Places", it is an extra click. If you have Vista, drag the preferred folder to Favorite Links. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "garyf" <garyf@discussions.microsoft.com> wrote in message news:720BFDD0-...

Unable to Search Folders
Hi, I am unable to create new folders or search email folders in Outlook 2003. I thought this was related to the size of my mailbox so archived a HEAP of emails and the size of the file is now under 2GB (around ). Still a problem after this so I ran the Inbox Repair Tool and it did find errors but when I opened my Outlook profile again I cannot see the 'Recovered' files in the folder list? I do run multiple outlook profiles but checked the other profile and the files are not there either? Any suggestions? Thanks, Kate What happens when you try to create a new fo...

Can't open Sent Folder in Outlook 2007
When trying to access my Sent Folder the following error message occurs: "The messaging interface has returned an unknown error. If the problem persists, restart Outlook." I have restarted Outlook a number of times but continue to receive this message. Any idea why? With approximately 6000 messages contained therein, could the problem be that there are too many messages/too much weight in this folder? ...

Windows Explorer folder columns layout
Where does Windows Explorer store column layout for Details View for a particular folder? I need to be able to set which columns are shown and their order for a particular folder. I know Explorer stores a lot of information in: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/custom.asp I'm not sure that's where it stores the view for each folder, but perhaps starting there will lead you somewhere. Tom "Sasha" <Sasha@discussions.microsoft.com> wrote in message news:46541...

Is there a way to make the public folders the default folder?
In outlook if you right click on a contact and create a new appointment, it automatically goes into the involved users calendars. Is there a way to make this appointment go into the public calendar automatically? On Tue, 14 Feb 2006 10:16:18 -0800, Dan <Dan@discussions.microsoft.com> wrote: >In outlook if you right click on a contact and create a new appointment, it >automatically goes into the involved users calendars. Is there a way to make >this appointment go into the public calendar automatically? Not that I know of, unless you modify the Outlook form; in which cas...

how to copy 2009 folder structure to 2010 personal folders?
I have my personal folders for 2009 set up in a particular structure. I'd like to set up my 2010 folders in the same structure and am wondering if there is a way to copy to 2009 structure. There are about 75 folders and I'd rather not set them up 1 by 1 if it isn't necessary. thank you You can open the old pst in outlook 2010. If you don't want the old data, make a copy of the pst and open the copy in outlook 2010 then delete the old data, leaving the folders. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Excha...

Simple folder sync
Periodically during the day, I would like to copy the contents of a folder (with subfolders) from one computer (source) to two other computers on a home network. It's really nothing more than a simple sync of files because the data in the folder is only changed by the source computer, but used by the two other computers. I would like to schedule the sync to occur maybe 3 times per day. The job could run on the source and "push" the folder to the other 2 computers or each computer could have their own job and pull the folder. I would prefer the second solution be...

Inbox folders
Where does Outlook 2003 store the contents of the Inbox folder? I was trying to clean up some problems with my Contacts folder, and all of my email in the inbox from 11/2006 to the present are gone. All of my contacts are still current, so I thought the inbox files would be in a different location than the outlook.pst file. Thanks, On 8/10/07 8:16 PM, in article 0454DB3F-FACA-44D3-9350-A0E0A02086EB@microsoft.com, "Ed Wood" <EdWood@discussions.microsoft.com> wrote: > Where does Outlook 2003 store the contents of the Inbox folder? I was trying > to clean up some prob...

Forwarding a mail from your sent item folder
Hi, i have a trouble : when i forward a mail from my Sent Item Folder, then outlook 2003 instead of the predeterminate account it select the exchange account. In my organization exchange not is used to manage mail, only calendar services. Any ideas? thanks. ...

Outlook Inbox not receiving. Other folder in Inbox works.
I have 2 folders in Outlook Inbox. Can send from both but only receive in 1 folder. And both used to work until the 1 folder disappeared and had to be rebuilt. Flash, This newsgroup is dedicated to the Microsoft Access database product. The Microsoft website is not all that clear and may have misdirected you. I suggest re-posting your question to this newsgroup, if you are using Outlook (not Outlook Express): http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.general&lang=en&cr=US Tom Wickerath Microsoft Access MVP https://mvp.support.m...

outlook personal folder backup with multiple users/profiles
I have tried several times to get this to work. Perhaps there is a registry hack? I am running MS outlook 2002 SP1 and installed the pfbackup.exe add-in as one user (with admin rights) on a win xp pro machine. That user has "backup" appear under the file menu in outlook. However, when the other user (also admin rights) starts up their outlook session (under a different profile, of course), the file menu does not have "backup". Any ideas how to get the backup tool to work for all users of the system? thanks, Kevino ...

Public Folder Question #3
I recently took over a new mixed-mode Exchange Org and am trying to clean up their Public Folder tree. There is one folder called IPM_SUBTREE that I am not familiar with. Can this be removed or is it some kind of system folder that needs to remain in place? It has several subfolders that were probably moved there by accident and need to be removed, but what about the IPM_SUBTREE? It doesn't have any items in it... DON"T REMOVE IT!!!!! This is the basic tree where your mail enabled public folders live. It is also bound to your public folder store. There are two parts to the ...

Public Folder for only 3 of the 20 Exchange Users
We are running Exchagne. How do I create a public folder in Outlook where only the 3 owners of the company have access to? Thanks Ron you create the folder in Outlook and assign permissions for only the 3 people, making sure that the Default and Anonymous permissions are set to "none", and also deselect "Folder visible" if necessary... -- Susan Conkey [MVP] "Ron Boetger" <rboetger@bblink.net> wrote in message news:e87um2d8hpevrodagkpl010hj0vcc78l5n@4ax.com... > We are running Exchagne. How do I create a public folder in Outlook > where onl...

Cannot access more than 250 items in a folder
My company has a custom Outlook form for handling vacation and sick time requests. The form has fields for start date/time, end date/time, name, etc. I'm trying to write some code that will process a bunch of saved requests and display some totals, but I'm having trouble. The code simply stops working after about the 250th item in a folder. Any attempt to get at the custom properties of any item after the 250th is a blank. Here's some very simple code I wrote to illustrate the problem. It loops through each saved item and checks if the "requestor" property contains ...

Outlook 2007, how to stop accidental replies from a certain folder?
I have my college's email account auto-forwarded (they don't offer pop3 or imap) to my main gmail account so I don't have to go to their website to check for mail. That gmail account, and others, use pop3 down to my Outlook 2007. In my Outlook, I have a rule that puts mail sent to my @college address into a folder named Collegemail. Since the college email system lacks pop3 or imap, I have to go to their site to send a reply, so that the reply will be sent from my @college email address. The problem is that since I don't get very many emails to that address, I canno...

Sync certain folders between laptop and desktop
I am not running an Exchange server, and do only have one desktop computer and a laptop. I am not interested in having a 1:1 mirror of my PST files, but only to sync certain mail folders, contacts and rules. Seems like there is quite some sync tools for Outlook 2003 out there. Among a few I found, SyncPST and Easy2Sync seems to be capable of doing what I want. Is there someone here with experience using these tools, or have any other recommondation for me? Thanks a lot! Ola ...

Where did the "Favorites" folder (under "Look In:") go when openi.
In Excel 2003, when I go to File\open there used to be the "Favorites" folder listed under the "Look in:" area. Why is it gone and is there a way for me to get it back? Thanks, Karen Karen File>Open. In the Look in: browse to your C:\Documents and Settings\user\ and select Favorites folder. Don't open it, just select it. Now go over to Tools and "Add to My Places" You can also right-click on any folder currently in the "My Places" bar and remove it. Gord Dibben Excel MVP On Thu, 27 Jan 2005 10:21:02 -0800, "Karen" <Karen@di...