The function will use the type name of the placeholder (e.g. body, title), the layout name and few other criterias to find the corresponding location.
ph_location_type( type ="body", type_idx =NULL, position_right =TRUE, position_top =TRUE, newlabel =NULL, id =NULL,...)
Arguments
type: placeholder type to look for in the slide layout, one of 'body', 'title', 'ctrTitle', 'subTitle', 'dt', 'ftr', 'sldNum'.
type_idx: Type index of the placeholder. If there is more than one placeholder of a type (e.g., body), the type index can be supplied to uniquely identify a ph. The index is a running number starting at 1. It is assigned by placeholder position (top -> bottom, left -> right). See plot_layout_properties()
for details. If idx argument is used, position_right and position_top
are ignored.
position_right: the parameter is used when a selection with above parameters does not provide a unique position (for example layout 'Two Content' contains two element of type 'body'). If TRUE, the element the most on the right side will be selected, otherwise the element the most on the left side will be selected.
position_top: same than position_right but applied to top versus bottom.
newlabel: a label to associate with the placeholder.
id: (DEPRECATED, use ‘type_idx’ instead ) Index of the placeholder. If two body placeholder, there can be two different index: 1 and 2 for the first and second body placeholders defined in the layout. If this argument is used, position_right and position_top will be ignored.
...: unused arguments
Details
The location of the bounding box associated to a placeholder within a slide is specified with the left top coordinate, the width and the height. These are defined in inches:
left: left coordinate of the bounding box
top: top coordinate of the bounding box
width: width of the bounding box
height: height of the bounding box
In addition to these attributes, a label can be associated with the shape. Shapes, text boxes, images and other objects will be identified with that label in the Selection Pane of PowerPoint. This label can then be reused by other functions such as ph_location_label(). It can be set with argument newlabel.