Insert OLE objects

Hi,

Smile

I am working on DXL code which will loop all the objects and find the word <OLE> and it will call Insert>OLE Object>Object type>Microsoft Word Document.

SO basically I want to insert a blank DOORS word for OLE.

I need help to call the function Insert>OLE.

Actually I have to insert OLE object every time for new image and table given in the specs, so its consuming lot of time.

Thank you for the help.

-Amu


Amol_S - Wed Jul 05 22:40:39 EDT 2017

Re: Insert OLE objects
Mathias Mamsch - Mon Jul 17 06:46:46 EDT 2017

What you should do is, get the RTF for an empty Word OLE as a text, by creating it manually (eventually put some 'tbd' message inside). Then use

print richTextWithOle (current Object)."Object Text"

You will get some big RTF. Find the OLE object ({\object .... }) copy the text inside your code. Then loop through the objects, get the richTextWithOLE for each object and do a string replace on <OLE> and replace it by the richtext of the OLE. Make sure you wrap the OLE in "{...}" to not destroy the RTF source. 

Maybe that helps, regards, Mathias