![]() # Open an MSWord document containing the style definitionsĭoc % body_add_par("Item #001: The first item", style = "Equip Header")ĭoc % body_add_par("QUANTITY:One (1)", style = "Equip Detail")ĭoc % body_add_par("PROVIDED BY: K.E.C.", style = "Equip Detail")ĭoc % body_add_par("PROVIDED BY: K.E.C.", style = "Equip Detail") In R, I generate the content as follows: library(officer) (Note: I cannot post a Word file - see end of post for steps to create a minimally reproducible MSWord template document however, the challenge appears to be how tabs are handled by officer.) ![]() The template file is empty, but contains the style definitions we need. The tab stop is defined by the paragraph style in an existing MSWord document that is referenced as a template. I am generating a formatted collection of itemized details (similar to a catalog) in MSWord using the officer package.Įach item in the collection has a header followed by a line for each defined detail.Įach line (header or detail) has a label, followed by a tab, then the value.įor example: Item #001 The Name of the First Item
0 Comments
Leave a Reply. |