Creating and Manipulating Styles

createCharStyle(...)
createCharStyle(...)

Creates a character style. This function takes the following keyword parameters:

Any style attribute not explicitly defined will have its value inherited from default character style.

Due to the important number of arguments of this function, it is strongly advised to use Python keyword syntax when calling this function. For example if a style needs to alter only font size, do not use this syntax:

but use this syntax instead:

For some guidance on this showing in particular how to set tracking, see the wiki page Text and Text Manipulation.

createCustomLineStyle(...)
createCustomLineStyle(styleName, style)

Creates the custom line style 'styleName'.

This function takes list of dictionary as parameter for "style". Each dictionary represent one subline within style. Dictionary can have those keys:

createParagraphStyle(...)
createParagraphStyle(...)

Creates a paragraph style. This function takes the following keyword parameters:

If you wish to skip a number of settings, unfortunately, this command will not accept null values, i.e., a series of commas. You must put some integer value for each of the potential parameters. For example, imagine you wish to only specify a name for the Paragraph Style, and the Character Style. Your command should be something like:

On the other hand, if you only wanted to specify a name and linespacing mode, you can quit whenever after you finished with non-zero data:

getAllStyles(...)
getAllStyles() -> list

Deprecated, use getParagraphStyles() instead.

getCellStyles(...)
getCellStyles() -> list

Return a list of the names of all cell styles in the current document.

getCharStyles(...)
getCharStyles() -> list

Return a list of the names of all character styles in the current document.

getLineStyles(...)
getLineStyles() -> list

Return a list of the names of all line styles in the current document.

getParagraphStyles(...)
getParagraphStyles() -> list

Return a list of the names of all paragraph styles in the current document.

getTableStyles(...)
getTableStyles() -> list

Return a list of the names of all table styles in the current document.