0

Pretty simple question here, but I can't find any resources as to why this is happening.

I am using the officer package in R to automate the replacement of some text at bookmarks in a large template file. However, when the document is printed out again, in Word the boxes in "Header & Footer" named "Different First Page" and "Different Odd & Even Pages" get checked when they shouldn't be and were not checked in the original document. Also, these headers/footers do contain images, so perhaps that is part of the problem?

To be 100% clear here: I tested this with just these lines of code (none of the bookmark replacements) and it still does this.


templateFile = #file path for original document  
finalDocNameAndLocation = #file path for output document  
  
doc_1 <- templateFile %>% read_docx()  
print(doc_1, finalDocNameAndLocation)  

Obviously there is a simple fix where I just go and un-check those boxes after printing, but I would love to know why R does this.

Thanks!

KGriff
  • 1
  • 1

0 Answers0