I am trying to create more than one numbered list in a Word document using the following script:
doc_1 <- read_docx()
bl1 <- block_list(
fpar(ftext("hello", shortcuts$fp_bold(color = "red"))),
body_add_par(doc_1, "Item 1", style = "List Number"), #The template file I am loading into read_docx() has a style called 'List Number'
body_add_par(doc_1, "Item 2", style = "List Number"),
body_add_par(doc_1, "Item 3", style = "List Number"),
body_add_par(doc_1, "Item 4", style = "List Number")
)
body_add_blocks(doc_1, blocks = bl1)
bl <- block_list(
fpar(ftext("hello", shortcuts$fp_bold(color = "red"))),
body_add_par(doc_1, "Item 1", style = "List Number"),
body_add_par(doc_1, "Item 2", style = "List Number"),
body_add_par(doc_1, "Item 3", style = "List Number"),
body_add_par(doc_1, "Item 4", style = "List Number")
)
body_add_blocks(doc_1, blocks = bl)
body_add_par(doc_1, "Item 1", style = "Normal")
The second list does not start at a new number but continues from the previous one. How can I start a new list?