|[Top] [Chapter] [Previous] [Next]|
function ParStrCommand(ComID: Integer; param: Integer; const StrParam: WideString): Integer;
The following command IDs are currently used:
2: Convert a string into a number, use it with the code WPAT_NumberTEXTB and WPAT_NumberTEXTA. (Better use convert utility)
3: Convert a color string into a number, use it with the code WPAT_CharColor. (Better use convert utility)
4: Assigns the name of this paragraph. This is not the "cellname". It can be searched for with ID 10 and 11.
5: Assigns the "cell name" to the parent cell of this paragraph. Returns -1 if not in a table. (same as property CellName)
6: Assigns the "cell command" to the parent cell of this paragraph. Returns -1 if not in a table.
7: Assigns the name to the parent table of this paragraph. Returns -1 if not in a table. The table name can be used in MoveToTable.
8: Assigns a name to this paragraph.
9: A paragraph style can be set using property StyleName. For a more control apply the style using ParStrCommand( 9, param, name ) to set and apply a style. If bit 1 is set in "param", the character attributes, which are used by the selected style, are cleared, if bit 2 is set, the paragraph attributes are cleared. The style does not have to exist. The function returns its number if successful. ()
Also see: "Paragraph Styles".
10: Locates a paragraph with a given name (use ID 4 to set) and makes it the current. Returns a value>0 if the paragraph was found. If param <> 0, the search will be started with the first paragraph after the current.
11: Locates a paragraph with a given name - ignores cases.
12: Locates a paragraph with a given text and moves there.
Alternative to the commands 10 - 12: Memo.TextCommandStr(42).