Hi j,
Am 17.02.2010 21:53, schrieb j philoon:
I need to navigate to the next table after or coinciding with a certain
bookmark in a MS Word doc.  Ideally I would like to determine that the range
of the bookmark and a table intersect, but if I can get to a bookmark and
then navigate forward to the next table that would work too.  Can anyone
recommend a means of doing this?  Thanks.


Contrary to MS Word a bookmark cannot start in "normal" text and end in a table and vice versa.

So you have to jump to the bookmarks anchor with a cursor and to check the property "TextTable" or "Cell".

In Java it would look like this:

XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xRange);
XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
XCell xCell = null;
// getPropertyValue gives null or the object
                                
if (xPropertySetInfo.hasPropertyByName("Cell")) {
xCell = (XCell)UnoRuntime.queryInterface(XCell.class, xPropertySet.getPropertyValue("Cell"));
        }
                                
if (xCell instanceof XCell) {
        // do something
}

Regards

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to