Searching for a string inside embedded Word objects?

The DOORS search tool (Tools->Find or Edit->Find) doesn't search embedded Word objects (we have a lot in our database, mainly embedded Word tables, since DOORS tables don't work very well). Is there a way to do this in DXL?

Thanks,
Ken.

Joined Telelogic DOORS forum 12-Sep-2003.

DOORS 8.2, running on Windows 2000 Server, accessed via Citrix.

Powered by caffeine and a lot of luck...
mcnairk - Wed Dec 23 11:17:33 EST 2009

Re: Searching for a string inside embedded Word objects?
kbmurphy - Wed Dec 23 12:05:08 EST 2009

Not really.

Best bet is to export to word, run the ExpandWordOLEs macro (which you can download from baselinesinc.com) and then find in MS Word.

Re: Searching for a string inside embedded Word objects?
Mathias Mamsch - Wed Dec 23 16:53:57 EST 2009

You could do this in DXL - however it is complicated to get right and the question would be what performance you would get/need.

The options I see are:
  • you extract the text of all embedded Word objects to an (DXL-) attribute or a DXL Layout column and search that column

  • you implement your own find function and search embedded objects yourself.

You would need to find embedded word objects first parsing the richtext of the objects. Then you would use the "OleAutoObj oleGetAutoObject (Object, Column col, int oleIndex)" perm to transform the OLE object into an OleAutoObj. If you want to search the embedded word document you use the "Find" object (see Word Documentation). If you want to extract the text you just get the "ActiveDocument.Range.Text" property, but I don't know if the table text will be in there.

Hope this helps.

Regards, Mathias

Re: Searching for a string inside embedded Word objects?
mcnairk - Thu Dec 24 09:11:03 EST 2009

kbmurphy - Wed Dec 23 12:05:08 EST 2009
Not really.

Best bet is to export to word, run the ExpandWordOLEs macro (which you can download from baselinesinc.com) and then find in MS Word.

This sounds similar to exporting using WEXP with the "WEXP OLE Inline" attribute set to TRUE. However, I would have to export about 50 modules on a periodic basis (e.g. a weekly batch job run at night) to maintain an up-to-date searchable database on a shared drive.

Thanks,
Ken.

Re: Searching for a string inside embedded Word objects?
mcnairk - Thu Dec 24 09:20:23 EST 2009

Mathias Mamsch - Wed Dec 23 16:53:57 EST 2009
You could do this in DXL - however it is complicated to get right and the question would be what performance you would get/need.

The options I see are:

  • you extract the text of all embedded Word objects to an (DXL-) attribute or a DXL Layout column and search that column

  • you implement your own find function and search embedded objects yourself.

You would need to find embedded word objects first parsing the richtext of the objects. Then you would use the "OleAutoObj oleGetAutoObject (Object, Column col, int oleIndex)" perm to transform the OLE object into an OleAutoObj. If you want to search the embedded word document you use the "Find" object (see Word Documentation). If you want to extract the text you just get the "ActiveDocument.Range.Text" property, but I don't know if the table text will be in there.

Hope this helps.

Regards, Mathias

This is way beyond my modest DXL expertise; I would have to pay someone to write this. However, I'd hate to re-invent the wheel. Since we all know that DOORS tables are useless, surely everyone is using embedded Word tables. So I'm amazed that no-one out there has something like this already.

Many thanks,
Ken.

Re: Searching for a string inside embedded Word objects?
Mathias Mamsch - Fri Dec 25 02:01:10 EST 2009

mcnairk - Thu Dec 24 09:20:23 EST 2009
This is way beyond my modest DXL expertise; I would have to pay someone to write this. However, I'd hate to re-invent the wheel. Since we all know that DOORS tables are useless, surely everyone is using embedded Word tables. So I'm amazed that no-one out there has something like this already.

Many thanks,
Ken.

Heh. I bet there are dozens that already paid someone to write something like this. But my experience is that not many people like the idea of sharing their DXL code. Is anyone in for a public DXL repository?

Re: Searching for a string inside embedded Word objects?
SystemAdmin - Fri Dec 25 03:46:52 EST 2009

Mathias Mamsch - Fri Dec 25 02:01:10 EST 2009
Heh. I bet there are dozens that already paid someone to write something like this. But my experience is that not many people like the idea of sharing their DXL code. Is anyone in for a public DXL repository?

Definitely me. But then,we would probably be on the side of the leeches....we haven“t got so much stuff to share yet.

Re: Searching for a string inside embedded Word objects?
SystemAdmin - Mon Dec 28 08:35:09 EST 2009

Mathias Mamsch - Fri Dec 25 02:01:10 EST 2009
Heh. I bet there are dozens that already paid someone to write something like this. But my experience is that not many people like the idea of sharing their DXL code. Is anyone in for a public DXL repository?

Check out the IBM DXL Wiki

https://www.ibm.com/developerworks/wikis/display/dxl/Home