How to change link source path of OLE object

E

Elena Yudovina

A link source path of an OLEobject may be determined via the ForeignData
property of associated shape. However this property can't be changed. Is
there any way to programmatically relink an OLEobject to another file?
 
J

JuneTheSecond

Hi,

I have not yet heard that any body had found the way to read the link path.
I have not the idea than that to write the path in the shape text or in any
other cell, for example, user defined cell, when you insert the object .
For example:
MyFile = "C:\Documents and Settings\thmith\My Documents\mydata.xls"
Set shp = ActivePage.InsertFromFile(MyFile, visInsertLink)
shp.Text = MyFile



--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 
E

Elena Yudovina

Thanks for your answer!
I have not yet heard that any body had found the way to read the link path.

The ForeignData property contains a serialized OLE object, so it is not
difficult to extract link source information from it.
I have not the idea than that to write the path in the shape text or in any
other cell, for example, user defined cell, when you insert the object .
For example:
MyFile = "C:\Documents and Settings\thmith\My Documents\mydata.xls"
Set shp = ActivePage.InsertFromFile(MyFile, visInsertLink)>
The problem is that this way a new shape is created and I need just to
change link path of a shape that already exists. Everything must remain the
same, only the link path... VBAs of all the other Office applications (Word,
Excel, PowerPoint) have such function - and Visio hasn't?

Regards,
Elena.
 

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