Learn R Programming

R2wd (version 1.4)

wdSetProperty: Set a property in Word.

Description

This function descends down a property tree given in the parameter vector property and sets the lowest level to value.

Usage

wdSetProperty(property, value, object = wdapp[["Selection"]], wdapp = .R2wd)

Arguments

property
The name of a property or a vector indicating a path in a property tree.
value
The value, the lowest level in the property tree should be set to.
object
The object on which the property tree should start.
wdapp
The handle to Word.

Value

    Details

    This function descends down the indicated property tree. It can also work with calls to the 'Items' method. In this case, the corresponding item numbers should be inserted in the property vector.

    See Also

    wdGetProperty

    Examples

    Run this code
    wdGet()
    wdTitle("Title")
    wdWrite("This is in normal font")
    wdSetProperty(c("Font","Name"),"Garamond")
    wdSetProperty(c("Font","Size"),20)
    wdWrite("This is in 14pt Garamond")
    wdNormal("This switches back to Normal")

    Run the code above in your browser using DataLab