views:

24

answers:

1

I have a word template doc and I would like to insert a bulleted list. The template doc has bookmarks. I'm iterating through the bookmarks when I get to the "Feature list" I want to present it as a bulleted list:

I've tried something like this

for (FieldBookmark bookmark : FieldBookmark.values()) {
/if bookmark name == "Feature/Current"
            if(bookmark.name().equalsIgnoreCase("SH_CURRENT_FEATURE_BOOKMARK")) {
                 com.sun.star.beans.XPropertySet xCursorProps = (com.sun.star.beans.XPropertySet) UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, textCursor);
                 xCursorProps.setPropertyValue ("Name","BulletChar");

            }

}
A: 

Bearing in mind my comment above, you could use a tool to do this like Docmosis which uses the same infrastructure (OpenOffice and Java) and has the ability to populate numbered/bullet lists in Word docs. Might be easier than using the UNO api directly. If you want/need to use the UNO API, then can you say more about what happens when you run your code?

jowierun