473,467 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

I want to locate a file, copy it to another folder, and hyperlink

76 New Member
Hello all,

I have a button that opens a browse for window, to allow you to find a file and create a hyperlink to that file. This is then placed in a text box. The code I use is:
Expand|Select|Wrap|Line Numbers
  1. Private Sub browse_Click()
  2.  
  3.     Me.[Hyperlink].SetFocus
  4.     On Error GoTo browse_stop
  5.     RunCommand acCmdInsertHyperlink
  6. browse_stop:
  7.  
  8. End Sub
  9.  
I would like to expand this a little. I want to locate a file, no matter where, copy it to a specified folder, and then create a hyperlink to the copied file. I would also like to do more then one hyperlink if at all possible.

Thanks in advance,

Brian Smith
Apr 15 '08 #1
6 3127
aprpillai
23 New Member
Browsing for Files have a look at this link:
http://msaccesstips.com/2006/10/file...msaccess.shtml

Hyperlinks to an External File can be made by setting the Object's (Command Button, Label etc.) Hyperlink Address Property with External File Path.
Apr 15 '08 #2
Briansmi1116
76 New Member
This is what my code does already, I am wanting the button to not only do this, but to copy the file no matter where it is, and paste it in the folder on the network where all my hyperlink files go. Then hyperlink to it. I also want to expand it to do more then one hyperlink.
Apr 15 '08 #3
JKing
1,206 Recognized Expert Top Contributor
This is what my code does already, I am wanting the button to not only do this, but to copy the file no matter where it is, and paste it in the folder on the network where all my hyperlink files go. Then hyperlink to it. I also want to expand it to do more then one hyperlink.
The FileCopy command will allow you to copy and paste a file from a source to a destination. An error will occur if the file is open.

Here's an example of using the FileCopy statement.

Expand|Select|Wrap|Line Numbers
  1. FileCopy "C:\Jared.txt", "C:\Test\Jared.txt"
  2.  
C:\Jared.txt is the Source
C:\Test\Jared.txt is the Destination

Hope that helps,

Jking
Apr 15 '08 #4
Briansmi1116
76 New Member
That sounds good, but my button only opens a hyperlink browse window. I want to be able to open a browse window, select the file, then make a copy of it and plce it in another folder, then I want it to create a hyperlink to it.
Apr 15 '08 #5
JKing
1,206 Recognized Expert Top Contributor
That sounds good, but my button only opens a hyperlink browse window. I want to be able to open a browse window, select the file, then make a copy of it and plce it in another folder, then I want it to create a hyperlink to it.
Okay,

So you want the user to be able to select a file to be copied from a browse file menu.

Do you want the user to be able to choose a destination path in a similar fashion? Or do you want all files to be copied to the same destination?
Apr 17 '08 #6
Briansmi1116
76 New Member
yes that is exactly right. I want the file to go to a specified location. But the only other problem I will have is that the text box only allows for one file to be hyperlinked. If there is a way to do multiple hyperlinks that would be great, but if not, I would like to not only hyperlink the file but be able to copy and hyperlink a folder.

Brian
Apr 17 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: davidgordon | last post by:
Hi, This seems impossible to me. I've read tons of posts, but I just cannot fathom it out. I have a form for our range of products. There are four fields (text) which need to be filled with an...
2
by: Bala | last post by:
Hi I am trying to download the PDF files from my webserver using ASP.Net. All my files are stored at F Drive on webserver. Like this F:\Main Folder\Sub Folder\Files\File1.pdf I am...
3
by: The Woo | last post by:
Can one programatically create a file folder which has the same name as a key field, using a command button? Or, Can there be a a command button which opens up a directory tree to a specified...
9
by: Morris Neuman | last post by:
Im working with VS 2005 and trying to use a Hyperlink field in a datagrid to play a wave file that is not located in the website folders but is in a plain folder on the same machine, windows 2003...
4
by: Abubakar | last post by:
Hi, I'm using vs2k5 vc++ (native/unmanaged). I just took a separate copy of a project from source control (vss) and after fixing its dependencies build it and it builds fine. But when I try to...
0
by: ptkumar | last post by:
Hi All, 1. I have upload files stored in temparary folder with in a context path. when i give hyperlink to the file name, i got error 'File Not Found' if i redeploy the war file then, it will...
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
3
tdw
by: tdw | last post by:
I have a working hyperlink field in a table, and it's form. I also have a working File Picker Dialog: FileDialog(msoFileDialogFilePicker), being used to create the hyperlink. What I need to do, and...
1
by: chaosbuddha | last post by:
Hi! I am trying to set-up mysql-zrm to take backups of a remote mysql server. The mysqlhotcopy command is throwing up the following error: Output of command: 'mysqlhotcopy' is { ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.