Last chance! 50% off unlimited learning
Sale ends in
WrdSetFont
sets the font in Word for the text to be inserted. WrdGetFont
returns the font at the current cursor position.WrdSetFont(fontname = "Consolas", fontsize = 7, bold = FALSE, italic = FALSE,
wrd = getOption("lastWord"))
WrdGetFont(wrd = getOption("lastWord"))
GetNewWrd()
or an existing one, created by GetCurrWrd()
.
Default is the last created pointer stored in getOption("lastWord")
.WrdText
, WrdPlot
, GetNewWrd
, GetCurrWrd
# Windows-specific example
# start word
wrd <- GetNewWrd()
for( i in seq(10, 24, 2)) {
WrdText(gettextf("This is Arial size %s \n", i), appendCR=FALSE,
fontname="Arial", fontsize=i)
}
for( i in seq(10, 24, 2)) {
WrdText(gettextf("This is Times size %s \n", i), appendCR=FALSE,
fontname="Times", fontsize=i)
}
Run the code above in your browser using DataLab