Using headers after page 1 (frontpage) using officeR

I tried to combine two documents using officer.

But one document is a frontpage and the other document has headers. The problem is that when I join them, the front page also has headers.

How can I join or merge two documents while keeping separated the header from the frontpage?

#creating the front page. 
#summarized version since it will have added features
my_doc_frontpage <- read_docx()
    
my_doc_frontpage <- my_doc_frontpage %>%
      body_add_img(src = "logo.png", width = 1, height = 0.8, style = "centered") 
print(my_doc_frontpage,"frontpage.docx")

#reading the file containing some headers. 
#summarized version since it will have added features
my_doc <- read_docx("base.docx")

my_doc <-   body_add_docx(my_doc,"frontpage.docx")
    
print(my_doc,"combined.docx")

but the combined.docx file has the frontpage with the header modified

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.