Re: How to Link a file instead of embeding in Access Table
- From: John Nurick <j.mapSoN.nurick@xxxxxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 20:38:15 +0100
Hi Gary,
I almost never use OLE fields to store files (whether linking or
embedding). It's usually simpler just to store the names and locations
of the files in text or hyperlink fields (if the latter, the user can
just click on the hyperlink and Windows will open the file in its parent
application).
But as far as I know the sample code at
http://support.microsoft.com/?id=198466 will do what you want if you
just change these lines
[OLEFile].OLETypeAllowed = acOLEEmbedded
[OLEFile].SourceDoc = [OLEPath]
[OLEFile].Action = acOLECreateEmbed
to
[OLEFile].OLETypeAllowed = acOLELinked
[OLEFile].SourceDoc = [OLEPath]
[OLEFile].Action = acOLECreateLink
If you examine the sample code you'll see that it uses the Dir()
function to get the file names, and then stores them in the text field
OLEPath. You can use Dir() in the same way to get the file names and
locations and store them in a hyperlink field.
On Wed, 29 Mar 2006 10:32:01 -0800, Gary
<Gary@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I have seen searching and posting for help for the last 7+ days. I have not
recieved any help so far.
I hope this isn't a dumb question!!! I also tried the knowledge base, etc
with on information on reconnecting links. Could I use that if I put a OLE
object with a broken link and reconnect???
I am trying to link a folder with individual files into a table record by
record using code. There is an OLE Object defined in the table to take the
object. I have did it with embed objects by making a record and copying it
into each of the record of the OLE Field. I wish to change over to an Linked
system, and need help in putting a link of file into the field with the OLE
Object defined on each record.
I deeply appreicated any help that you can give!!!!
Thanks,
Gary
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.
- Follow-Ups:
- Prev by Date: Re: Access 97 Query to a tab delimited file
- Next by Date: FoxPro ODBC drivers (OWC.exe file from MS) - NOT installing ??
- Previous by thread: Re: Access 97 Query to a tab delimited file
- Next by thread: Re: How to Link a file instead of embeding in Access Table
- Index(es):
Relevant Pages
|