Exporting OLE Records

J

Justin

I have a Document Control Database set-up using Access.
There ia a table with an OLE field that stores the entire
document. I would like to automatically export each row
out to a file so I can have a directory filled with all my
document files. Any help will be appreciated.
 
S

Stephen Lebans

A quick search on GoogleGroups would have yielded the desired solution
based on Word Automation from within Access. Here is a sample post:

From: Alick [MSFT] ([email protected])
Subject: RE: Convert ole from embedded to linked


View this article only
Newsgroups: microsoft.public.access.modulesdaovba
Date: 2003-11-26 04:19:48 PST


Hi Jeff,

We need to save the embedded object to a file and then relink the
object.
The saving code will like:

Dim NewDoc As String
DocPath = "c:\worddoc.doc"
With Me.OLEObject
.Class = "Word.Document"
.Verb = acOLEVerbOpen
.Action = acOLEActivate
.Object.Application.Documents.Item(1).SaveAs DocPath
.Object.Application.Quit
.Action = acOLEClose

End With

Please feel free reply to the threads if you have any questions or
concerns.


Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top