Joined: 30 May 2004
Location: The Netherlands, Europe
|Posted: Sun Dec 12, 2004 3:12 pm Post subject: Iterating fields in header of writer doc.
I'm writing a macro in OO-Basic that iterates through (datetime) fields with:
|enum = thisComponent.getTextFields().createEnumeration
field = enum.nextElement
if field.supportsService("com.sun.star.text.TextField.DateTime") then
range = field.getAnchor()
' -- Do things with the field
This also iterates through fields in the pageheader, which is what I want.
But how to check if the current field in the loop is inside the header or in the text (or in any other part of the doc for that matter)?
Or the other way around: first loop iterates through the fields in the header only, second loop goes through the fields in the text itself. Can this be done?
Thanks in advance,