Word files in access table

  • Thread starter Thread starter Hjalte Dam
  • Start date Start date
H

Hjalte Dam

Hi,

I'm having a problem with storing word files in a table. I
have a field called "CV" with the data type "OLE object".
It works when I try to store .bmp files there, but when I
try with a word file, the following error message appears:

A problem occurred while Microsoft Office Access was
communicating with the OLE server.
Try one or more of the following:
- Make sure you're connected to the network server where
the OLE server application is located.
- Close the OLE server and restart it outside of Microsoft
Office Access. Then try the original operation again from
within Microsoft Office Access.
- Reinstall the OLE server to ensure that it's registered.

What is an OLE server and how can I initiate the above
mentioned solutions? Everything is run locally on my pc,
and it's a brand new computer with pre-installed and
legally registered software.

It's very important for the funktionality of my program
that this gets to work. Thank you in advance!

Best regards
Hjalte Dam
 
Hi Hjalte

I suggest you keep the word documents as separate files outside your
database, and store the full path to the document in a text field in your
record. Alternatively, you could keep all the documents in the same folder
and store only the document name in the record, while the folder path is
stored in a "Settings" table.

This will greatly reduce the size of your database file and also lessen the
risk of problems with corruption.

It is easy to open a Word document from some VBA code (attached, say, to the
Click event of a button on a form):

Dim oWordApp as Object
Set oWordApp = CreateObject( "Word.Application")
oWordApp.Documents.Open( strDocumentPath )
oWordApp.Visible = True
Set oWordApp = Nothing

Alternatively, you can call the ShellExecute system function. For details,
see http://www.mvps.org/access/api/api0018.htm
 
Back
Top