Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

UNO: change page style?

I'm trying to set the first page style to, well… «First page» ☺

But I couldn't get it work. E.g. supposing the the file is the current document, then:

>>> cursor = file.Text.createTextCursor()
>>> cursor.setPropertyValue("PageStyleName", "First Page")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
__main__.PropertyVetoException: Property is read-only: 'PageStyleName

Why is this? What am I supposed to do? I also found that the property appears for enumerating paragraphs, however attempt to change it ends the same way for me.

UNO: change page style?

I'm trying to set the first page style to, well… «First page» ☺

But I couldn't get it work. E.g. supposing the the file is the current document, then:

>>> cursor = file.Text.createTextCursor()
>>> cursor.setPropertyValue("PageStyleName", "First Page")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
__main__.PropertyVetoException: Property is read-only: 'PageStyleName

Why is this? What am I supposed to do? I also found that the property appears for enumerating paragraphs, however attempt to change it there ends the same way for me.

UNO: change page style?

I'm trying to set the first page style to, well… «First page» ☺

But I couldn't get it work. E.g. supposing the the file is the current document, then:

>>> cursor = file.Text.createTextCursor()
>>> cursor.setPropertyValue("PageStyleName", "First Page")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
__main__.PropertyVetoException: Property is read-only: 'PageStyleName

Why is this? What am I supposed to do? I also found that the property appears for enumerating paragraphs, however attempt to change it there ends the same way for me.

UNO: change page style?

I'm trying to set the first page style to, well… «First page» ☺

But I couldn't get it work. E.g. supposing the file is the current document, then:

>>> cursor = file.Text.createTextCursor()
>>> cursor.setPropertyValue("PageStyleName", "First Page")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
__main__.PropertyVetoException: Property is read-only: 'PageStyleName

Why is this? What am I supposed to do? I also found that the property appears for enumerating paragraphs, however attempt to change it there ends the same way for me.

[edit: removed redundant tag]