Embedding OLE Links in a word document?

R

Robin Tucker

Hi,


I have an OLE object embedded in my Word document (in this case, an object
of type "MyCompany.TemperatureMap"). I embed the object as follows:

theNewShape = m_LoadedDocument.InlineShapes.AddOLEObject( _
ClassType:="MyCompany.TemperatureMap", _
FileName:=CType(thePathToMyTemperatureMap, Object), _
LinkToFile:=False, _
DisplayAsIcon:=False, _
Range:=theShape.Range)


This object implements the IOleItemContainer interface. This interface can
return to me "tools" which have an X, Y position in the map and a
temperature value. These tools support IDataObject. It is possible in Word
to "copy" one of these tools from an active MyCompany.TemperatureMap and
"paste link" into the document, such that when the tool is moved around on
the map, the tool value in the document is automatically updated (its "hot"
linked).

The trouble I'm having is doing this without user intervention. Does anyone
know how I can embed a "link" programmatically?

Thanks for any help you can give me on this,





Robin
 
R

Robin Tucker

Hmmmm. I got it (I think). Inserting a field code, (something like this)
should do it:



{ LINK MyCompany.TemperatureMap "Document1" "_1157453532\\Spot 1" \a \t }
 

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