Convert ole from embedded to linked

J

Jeff

I have a database with embedded Excel spreadsheets -
embedded as ole objects. I need to convert them to be
linked instead of embedded. I was planning to use the
record ID as the name, i.e. 101.xls for record 101. How
do I convert all the embedded spreadsheets to be linked
instead?
 
A

Alick [MSFT]

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>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Content-Class: urn:content-classes:message
| From: "Jeff" <[email protected]>
| Sender: "Jeff" <[email protected]>
|
| I have a database with embedded Excel spreadsheets -
| embedded as ole objects. I need to convert them to be
| linked instead of embedded. I was planning to use the
| record ID as the name, i.e. 101.xls for record 101. How
| do I convert all the embedded spreadsheets to be linked
| instead?
|
 

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