Text alignment in power point with R / officer

884 views Asked by At

I am experimenting with the automation of some reports and I would like to stick to the corporate power point style (at least as much as possible). Using directly the available template with

ppt <- read_pptx("myTemplate.pptx")

is quite complicated at least for me.

Therefore I am trying to work with the standard "Office Theme" and I am trying to make it look close to the company template. I would like to be able to left align ctrTitle, subTitle and title types.

If I run the example below the title is centered. Does anyone know how to left align it? I could not find in the documentation.

Thank you in advance.

require(officer)

require(magrittr)

ppt = read_pptx()

ppt = ppt %>% add_slide(layout = "Title Slide", master = "Office Theme") 


ppt = ppt %>% ph_with_text(str = "Title String", type = "ctrTitle") 

print(ppt, target = "first_example.pptx") %>% invisible()
0

There are 0 answers