21.08.2013 Views

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

OpenOffice.org BASIC Guide.pdf - OpenOffice.org wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

More Than Just Text 118<br />

Number of Pages, Words and Characters<br />

The text fields<br />

•<br />

•<br />

•<br />

com.sun.star.text.textfield.PageCount<br />

com.sun.star.text.textfield.WordCount<br />

com.sun.star.text.textfield.CharacterCount<br />

return the number of pages, words, or characters of a text. They support the following<br />

property:<br />

NumberingType (const)<br />

numbering format (guidelines in accordance with constants from<br />

com.sun.star.style.NumberingType<br />

).<br />

Current Page<br />

The number of the current page can be inserted in a document using the<br />

com.sun.star.text.textfield.PageNumber<br />

text field. The following properties can be specified:<br />

NumberingType (const)<br />

number format (guidelines in accordance with constants from<br />

com.sun.star.style.NumberingType<br />

).<br />

Offset (short)<br />

offset added to the number of pages (negative specification also possible).<br />

The following example shows how the number of pages can be inserted into the footer of a<br />

document.<br />

Dim Doc As Object<br />

Dim DateTimeField As Object<br />

Dim PageStyles As Object<br />

Dim StdPage As Object<br />

Dim FooterCursor As Object<br />

Dim PageNumber As Object<br />

Doc = StarDesktop.CurrentComponent

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!