Elements of slide masters are identified by placeholder labels. As PowerPoint masters are created the labels can be difficult to predict. Word documents are identified by style names. This function will create a layout file identifying all of the elements of each slide master for a PowerPoint template or each paragraph and table style for a Word template.

view_layout(
  template = file.path(system.file(package = "onbrand"), "templates", "report.pptx"),
  output_file = NULL,
  verbose = TRUE
)

Arguments

template

Name of PowerPoint or Word file to annotate (defaults to included PoerPoint template)

output_file

name of file to place the annotated layout information, set to NULL and it will generate a file named layout with the appropriate extension

verbose

Boolean variable when set to TRUE (default) messages will be

Value

List with the following elements

  • isgood: Boolean variable indicating success or failure

  • rpt: Officer with the annotated layout

  • msgs: Vector of messages

Examples

lpptx = view_layout(
     template = file.path(system.file(package="onbrand"), "templates", "report.pptx"),
     output_file   = file.path(tempdir(), "layout.pptx"))
#> --------------------------------
#> Generating annotated layout for a report template
#> Template:         /private/var/folders/9x/kwnn6qj93c122hwdlp5hrrnc0000gn/T/RtmpOKlrqg/temp_libpathd7fbcbbb6e/onbrand/templates/report.pptx
#> Annotated layout: /var/folders/9x/kwnn6qj93c122hwdlp5hrrnc0000gn/T//Rtmpt8TBs0/layout.pptx
#> --------------------------------

ldocx = view_layout(
     template = file.path(system.file(package="onbrand"), "templates", "report.docx"),
     output_file   = file.path(tempdir(), "layout.docx"))
#> --------------------------------
#> Generating annotated layout for a report template
#> Template:         /private/var/folders/9x/kwnn6qj93c122hwdlp5hrrnc0000gn/T/RtmpOKlrqg/temp_libpathd7fbcbbb6e/onbrand/templates/report.docx
#> Annotated layout: /var/folders/9x/kwnn6qj93c122hwdlp5hrrnc0000gn/T//Rtmpt8TBs0/layout.docx
#> --------------------------------