knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Create a macro to help standardize the look of tables outside of what can be done by R
.
```{sass eval = F} Sub FormatTables() If ActiveDocument.Tables.Count > 0 Then Dim objTable As Object
Application.Browser.Target = wdBrowseTable For Each objTable In ActiveDocument.Tables objTable.AutoFitBehavior (wdAutoFitWindow) Next
End If End Sub
## Put every table on it's own page ```{sass eval = F} Sub PagePerTable() ' ' PagePerTable Macro ' ' For Each Tbl In ActiveDocument.Tables Set myRange = Tbl.Range With myRange .Collapse Direction:=wdCollapseEnd .InsertBreak Type:=wdPageBreak End With Next End Sub
This macro reduces the size of all figures in an active document to 45% of its original size.
```{sass eval = F} Sub FormatFigures()
Dim shp As InlineShape
For Each shp In ActiveDocument.InlineShapes shp.ScaleHeight = 45 shp.ScaleWidth = 45 Next
End Sub ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.