# NOT RUN {
#START_TAG_TEST
doc.filename = "addImage_example.docx"
# set default font size to 10
options( "ReporteRs-fontsize" = 10 )
doc = docx( )
# the file 'logo.jpg' only exists in R for Windows
img.file = file.path( Sys.getenv("R_HOME"), "doc", "html", "logo.jpg" )
doc = addImage(doc, img.file )
# Write the object
writeDoc( doc, file = doc.filename )
#STOP_TAG_TEST
# }
Run the code above in your browser using DataLab