Skip to contents

Produces a report with each layout element labeled.

Usage

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

Details

Generates an Annotated report based on the template provided. 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.

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/l9/6pm7xq5j1hn6l00zrs22j6mc0000gn/T/RtmpS0xRdW/temp_libpath1236157a24ce7/onbrand/templates/report.pptx
#> Annotated layout: /var/folders/l9/6pm7xq5j1hn6l00zrs22j6mc0000gn/T//RtmpnVKGga/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/l9/6pm7xq5j1hn6l00zrs22j6mc0000gn/T/RtmpS0xRdW/temp_libpath1236157a24ce7/onbrand/templates/report.docx
#> Annotated layout: /var/folders/l9/6pm7xq5j1hn6l00zrs22j6mc0000gn/T//RtmpnVKGga/layout.docx
#> --------------------------------