PDA

View Full Version : Solved: Replace the http:part of a link with file:// or replace the server path



khyber
12-05-2005, 10:17 AM
In my system I have a form which contains five text boxes for inserting links to files which reside on a network server - not a web server. When users click on the text box, the EditHyperlink dialog box pops up and the user must navigate to a folder which resides on a network drive and link to the proper document(s). The problem with this action is this:

Everybody has mapped their network servers to different letters in the alphabet. I have mapped this particular server to my M drive, others may have mapped it to their J drive or their S drive. The server path and the subdirectories are the same for all users and it is:

Bp1mvwis001CCGContract Compliance SystemsCCD Master DBScanned CCD Documents

I need to either replace the prefix (the M: or J:) with BP1mvwis001CCG or replace the entire path with
Bp1mvwis001CCGContract Compliance SystemsCCD Master DBScanned CCD Documents and affix the file name afterward. Also, I think I need to put the file:// annotation somewhere in there.

I am pretty green in this area but, I would rather replace the entire path and affix the file name at the end.

Amanda1
12-05-2005, 10:55 AM
Hi Khyber, :hi:

I'm not quite sure if I've understood you 100%. I gather you are talking about a corporate network when you say different users have mapped drives differently. That isn't actually a problem - how the individual maps their own drives doesn't effect the global address reference. What you need to get from the administrator of your network if the prefix to the "BP1mv*******" address in full. This would then be your link and will bypass the individuals mapping.

If I haven't understood correctly what you are trying to do - send me a PM & I'll see if I can help.

Take care

Amanda

khyber
12-05-2005, 11:32 AM
If I understand you correctly, what I need is the network server path. The shared server path that my group uses is "Bp1mvwis001\Group\CCG".

The full path to the folder in which the scanned pfd files is stored is:

Bp1mvwis001\Group\CCG\Contract Compliance Systems\CCD Master DB\Scanned CCD Documents\(file name goes here.pdf)

The file name should be inserted after the folder name Scanned CCD Documents.

Group has many subdirectories. My group is CCG

Is that what you meant?

Amanda1
12-05-2005, 11:52 AM
Hi

Yes it is. Now why if you create a hyperlink quoting the full address, is it giving you a problem - or is it creating the hyperlink itself that is causing the problem?

If you create the link using the full address typed in, then the individuals drive mapping is irrelevant.

Also, is it a requirement that you enter the file - can't the user select the file from the directory after they have been "linked" to it - that way, you are not restricting yourself to just one file only - or is the file dynamic, which seems improbable if they are scanned documents?

What version of Excel are you running?

Cheers

Amanda :aw

khyber
12-05-2005, 11:59 AM
When Access 2003 inserts a hyperlink it automatically assumes it is an http address. If it ain't, then it copies the mapped drive letter followed by a colon into the hyperlink part. The end users are not very - I will say knowledgable - and they certainly aren't too energetic. They want the system to type in the full path for them. Therefore, I need to replace the drive letter and the colon with BP1mvwis001\CCG or replace the entire path with the full address. Either way, it should be an after update event. I tried putting the path in a string and concatenating it to the file name, but it won't work.

khyber
12-05-2005, 12:08 PM
Is there a way I can find the letter and the colon in the field and replace them? Such as find "M:" and replace it. Only, the M could be any letter in the alphabet. I would need to find everything in front of the colon and replace the colon and the letter in front.

Amanda1
12-06-2005, 02:26 AM
Hi

I did some looking at this one & I see now what you are getting at. I may just have a solution, but I will only be able to verify that it works tomorrow, when I can get onto a network server cause I'm working at home today. However, to try and speed things up for you, I've sent some mails to some of our network guys to see if they have any bright ideas.

Can you bear with me for 24-36 hours?

Cheers

Amanda

Amanda1
12-06-2005, 02:48 AM
Hi, me again

Had some chat with our network wizards and they think the same as me, (now that is scary).

Their answer is as follows

" Instead of linking to a previously mapped drive eg. M:\sharename, use the following network path \\servernameorIP\sharename (file://servernameorIP/sharename) in your link. This will dynamically access that server as you use it instead of premounting it as a drive and accessing that mount ".

Hope it solves your problem

Take care

Amanda:winking2:

khyber
12-09-2005, 09:51 AM
Amanda, sorry it took so long to get back. I have been trying out your last advice. I am trying to pull out the subdirectories from the file path and stick the servername and group name to the front as you instructed. Seems like it works if it is prefixed with file:// and then \\ followed by the subdirectories. Well, at least it does not give me error messages. Today I am working remotely (just to check this out) and the document opens and then shuts immediately.

I am on the right track.

Oh, and one more thing. Some of the file names had spaces in them (I have no control over that). When I eliminate the spaces I get results.

Thanks for your help, and thank the wizards for me.

Amanda1
12-09-2005, 12:30 PM
:hi: Khyber

Pleasure! Glad I could help.

Take care