Draw Borders to a Word Table
Drawing borders in a Word table is quite tedious. This function allows to select any range and draw border lines around it.
WrdTableBorders(wtab, from = NULL, to = NULL, border = NULL, lty = wdConst$wdLineStyleSingle, col = wdConst$wdColorBlack, lwd = wdConst$wdLineWidth050pt)
wtab |
|
from |
integer, a vector with two elements specifying the left upper bound of the cellrange. |
to |
integer, a vector with two elements specifying the right bottom of the cellrange. |
border |
a Word constant ( |
lty |
a Word constant ( |
col |
a Word constant ( |
lwd |
a Word constant ( |
nothing
Andri Signorell <andri@signorell.net>
## Not run: # create table tab <- table(op=d.pizza$operator, area=d.pizza$area) # send it to Word wrd <- GetNewWrd() wtab <- ToWrd(tab, wrd=wrd, tablestyle = NA) # draw borders WrdTableBorders(wtab, from=c(2,2), to=c(3,3), border=wdConst$wdBorderBottom, wrd=wrd) WrdTableBorders(wtab, from=c(2,2), to=c(3,3), border=wdConst$wdBorderDiagonalUp, wrd=wrd) # demonstrate linewidth and color wtab <- ToWrd(tab, wrd=wrd, tablestyle = NA) WrdTableBorders(wtab, col=RgbToLong(ColToRgb("olivedrab")), lwd=wdConst$wdLineWidth150pt, wrd=wrd) WrdTableBorders(wtab, border=wdConst$wdBorderBottom, col=RgbToLong(ColToRgb("dodgerblue")), lwd=wdConst$wdLineWidth300pt, wrd=wrd) # use an R color in Word RgbToLong(ColToRgb("olivedrab")) # find a similar R-color for a Word color ColToRgb(RgbToCol(LongToRgb(wdConst$wdColorAqua))) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.