Working with Word documents

read_docx() print(<rdocx>)

Create a 'Word' document object

set_doc_properties()

Set document properties

docx_set_paragraph_style()

Add or replace paragraph style in a Word document

docx_set_character_style()

Add character style in a Word document

change_styles()

Replace styles in a 'Word' Document

Word documents information

docx_summary()

Get Word content in a data.frame

docx_comments()

Get comments in a Word document as a data.frame

styles_info()

Read 'Word' styles

doc_properties()

Read document properties

docx_dim()

'Word' page layout

docx_show_chunk()

Show underlying text tag structure

length(<rdocx>)

Number of blocks inside an rdocx object

cursor_begin() cursor_bookmark() cursor_end() cursor_reach() cursor_reach_test() cursor_forward() cursor_backward()

Set cursor in a 'Word' document

docx_bookmarks()

List Word bookmarks

Add content to Word documents

body_add_blocks()

Add a list of blocks into a 'Word' document

body_add_caption()

Add Word caption in a 'Word' document

body_add_img()

Add an image in a 'Word' document

body_add_par()

Add paragraphs of text in a 'Word' document

body_add_table()

Add table in a 'Word' document

body_add_fpar()

Add fpar in a 'Word' document

body_add_toc()

Add table of content in a 'Word' document

body_add_break()

Add a page break in a 'Word' document

body_add_docx()

Add an external docx in a 'Word' document

body_bookmark()

Add bookmark in a 'Word' document

body_add_gg()

Add a 'ggplot' in a 'Word' document

body_add_plot()

Add plot in a 'Word' document

body_end_block_section()

Add any section

body_set_default_section()

Define Default Section

body_end_section_columns()

Add multi columns section

body_end_section_columns_landscape()

Add a landscape multi columns section

body_end_section_continuous()

Add continuous section

body_end_section_landscape()

Add landscape section

body_end_section_portrait()

Add portrait section

body_comment()

Add comment in a 'Word' document

body_append_start_context() write_elements_to_context() body_append_stop_context()

Fast Append context to a Word document

Word sections

prop_section()

Section properties

page_mar()

Page margins object

page_size()

Page size object

section_columns()

Section columns

Word simple tables

prop_table()

Table properties

table_colwidths()

Column widths of a table

table_conditional_formatting()

Table conditional formatting

table_layout()

Algorithm for table layout

table_stylenames()

Paragraph styles for columns

table_width()

Preferred width for a table

Replace content in Word documents

body_replace_gg_at_bkm() body_replace_plot_at_bkm()

Add plots at bookmark location in a 'Word' document

body_replace_text_at_bkm() body_replace_img_at_bkm() headers_replace_text_at_bkm() headers_replace_img_at_bkm() footers_replace_text_at_bkm() footers_replace_img_at_bkm()

Replace text at a bookmark location

body_replace_all_text() headers_replace_all_text() footers_replace_all_text()

Replace text anywhere in the document

Remove content from Word documents

body_remove()

Remove an element in a 'Word' document

Reading/writing PowerPoint documents

read_pptx()

Create a 'PowerPoint' document object

print(<rpptx>)

Write a 'PowerPoint' file.

Manipulate slides

add_slide()

Add a slide

layout_default()

Default layout for new slides

on_slide()

Change current slide

move_slide()

Move a slide

remove_slide()

Remove a slide

`slide_visible<-`() slide_visible()

Get or set slide visibility

Slide content

ph_with() ph_with.character() ph_with.numeric() ph_with.factor() ph_with.logical() ph_with.block_list() ph_with.unordered_list() ph_with.data.frame() ph_with.gg() ph_with.plot_instr() ph_with.external_img() ph_with.fpar() ph_with.empty_content() ph_with.xml_document()

Add objects on the current slide

phs_with()

Fill multiple placeholders using key value syntax

ph_location()

Location for a placeholder from scratch

ph_location_fullsize()

Location of a full size element

ph_location_id()

Location of a placeholder based on its id

ph_location_label()

Location of a named placeholder

ph_location_left()

Location of a left body element

ph_location_right()

Location of a right body element

ph_location_template()

Location for a placeholder based on a template

ph_location_type()

Location of a placeholder based on a type

ph_slidelink()

Slide link to a placeholder

ph_hyperlink()

Hyperlink a placeholder

ph_remove()

Remove a shape

set_notes()

Set notes for current slide

notes_location_label()

Location of a named placeholder for notes

notes_location_type()

Location of a placeholder for notes

Read PowerPoint information

pptx_summary()

PowerPoint content in a data.frame

slide_size()

Slides width and height

length(<rpptx>)

Number of slides

annotate_base()

Placeholder parameters annotation

layout_summary()

Presentation layouts summary

layout_properties()

Slide layout properties

plot_layout_properties()

Slide layout properties plot

layout_dedupe_ph_labels()

Detect and handle duplicate placeholder labels

layout_rename_ph_labels() `layout_rename_ph_labels<-`()

Change ph labels in a layout

slide_summary()

Slide content in a data.frame

color_scheme()

Color scheme of a PowerPoint file

media_extract()

Extract media from a document object

as.matrix(<rpptx>)

PowerPoint table to matrix

Content formatting

Define formatted paragraphs or parts of paragraphs, such as text, calculated Word fields, sets of paragraphs, etc.

fpar() update(<fpar>)

Formatted paragraph

block_caption()

Caption block

block_gg()

'ggplot' block

block_list()

List of blocks

block_pour_docx()

External Word document placeholder

block_section()

Section for 'Word'

block_table()

Table block

block_toc()

Table of content for 'Word'

unordered_list()

Unordered list

plot_instr()

Wrap plot instructions for png plotting in Powerpoint or Word

ftext()

Formatted chunk of text

run_autonum()

Auto number

run_bookmark()

Bookmark for 'Word'

run_columnbreak()

Column break for 'Word'

run_comment()

Comment for 'Word'

run_footnote()

Footnote for 'Word'

run_footnoteref()

Word footnote reference

run_linebreak()

Page break for 'Word'

run_pagebreak()

Page break for 'Word'

run_reference()

Cross reference

run_tab()

Tab for 'Word'

run_word_field() run_seqfield()

'Word' computed field

run_wordtext()

Word chunk of text with a style

set_autonum_bookmark()

Update bookmark of an autonumber run

external_img()

External image

hyperlink_ftext()

Formatted chunk of text with hyperlink

empty_content()

Empty block for 'PowerPoint'

sp_line() print(<sp_line>) update(<sp_line>)

Line properties

sp_lineend() print(<sp_lineend>) update(<sp_lineend>)

Line end properties

Formatting properties

fp_text() fp_text_lite() format(<fp_text>) print(<fp_text>) update(<fp_text>)

Text formatting properties

fp_par() fp_par_lite() print(<fp_par>) update(<fp_par>)

Paragraph formatting properties

fp_border() update(<fp_border>)

Border properties object

fp_cell() format(<fp_cell>) print(<fp_cell>) update(<fp_cell>)

Cell formatting properties

fp_tabs()

Tabs properties object

fp_tab()

Tabulation mark properties object

RTF

rtf_doc()

Create an RTF document object

rtf_add()

Add content into an RTF document

print(<rtf>)

Write an 'RTF' document to a file

Excel

read_xlsx() length(<rxlsx>) print(<rxlsx>)

Create an 'Excel' document object

add_sheet()

Add a sheet

sheet_select()

Select sheet

Misc

officer-package officer

Manipulate Microsoft Word and PowerPoint Documents with 'officer'

read_xlsx() length(<rxlsx>) print(<rxlsx>)

Create an 'Excel' document object

add_sheet()

Add a sheet

sheet_select()

Select sheet

shortcuts

shortcuts for formatting properties

sanitize_images()

Remove unused media from a document

slip_in_seqfield() slip_in_column_break() slip_in_xml() slip_in_text() slip_in_footnote()

Defunct Functions in Package officer