Get or Set the Paragraph Format in Word
WrdParagraphFormat
can be used to get and set the font in Word for the text to be inserted.
WrdParagraphFormat(wrd = DescToolsOptions("lastWord")) WrdParagraphFormat(wrd) <- value
value |
a list defining the paragraph format.
This can contain any combination of:
|
wrd |
the pointer to a word instance. Can be a new one, created by |
an object with the class paragraph
, basically a list with the attributes of the paragraph in the current cursor position:
LeftIndent |
left indentation in (in points) for the specified paragraphs. |
RightIndent |
right indent (in points) for the specified paragraphs. |
SpaceBefore |
spacing (in points) before the specified paragraphs. |
SpaceBeforeAuto |
|
SpaceAfter |
amount of spacing (in points) after the specified paragraph or text column. |
SpaceAfterAuto |
|
LineSpacingRule |
line spacing for the specified paragraph formatting. Use |
Alignment |
|
WidowControl |
|
KeepWithNext |
|
KeepTogether |
|
PageBreakBefore |
|
NoLineNumber |
|
Hyphenation |
|
FirstLineIndent |
value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. |
OutlineLevel |
outline level for the specified paragraphs. |
CharacterUnitLeftIndent |
left indent value (in characters) for the specified paragraphs. |
CharacterUnitRightIndent |
right indent value (in characters) for the specified paragraphs. |
LineUnitBefore |
amount of spacing (in gridlines) before the specified paragraphs. |
LineUnitAfter |
amount of spacing (in gridlines) after the specified paragraphs. |
MirrorIndents |
Long that represents whether left and right indents are the same width. Can be |
Andri Signorell <andri@signorell.net>
## Not run: # Windows-specific example wrd <- GetNewWrd() # get the handle to a new word instance WrdParagraphFormat(wrd=wrd) <- list(Alignment=wdConst$wdAlignParagraphLeft, LeftIndent=42.55) ToWrd("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est.\n", wrd=wrd) # reset WrdParagraphFormat(wrd=wrd) <- list(LeftIndent=0) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.