wdSetFont: Set font in Word.

Description Usage Arguments Details Author(s) Examples

Description

This function allows to set the font type and the font size of the active Word document.

Usage

1
wdSetFont(fontname = NULL, fontsize = NULL, bold=NULL, italic=NULL,wdapp = .R2wd)

Arguments

fontname

A font name Word knows about, such as Arial, Times New Roman, etc.

fontsize

The point size of the font.

bold

The point size of the font.

italic

The point size of the font.

wdapp

The handle to Word.

Details

This function uses the handle .R2wd to talk to Word and to change font name and size at the current position of the cursor in the active document.

Author(s)

Christian Ritter

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
wdGet()
wdTitle("Title")
wdWrite("This is in normal font")
wdSetFont(fontname="Garamond",fontsize=14,bold=TRUE,italic=TRUE)
wdWrite("This is in 14pt Garamond")
wdNormal("This switches back to Normal")

## End(Not run)

R2wd documentation built on May 2, 2019, 8:54 a.m.