R官包:当有多个几乎相同的占位符时如何指定某个占位符

Pla*_*Man 8 powerpoint r officer

我在 Powerpoint 幻灯片上使用 R 官员包,需要将文本插入到 5 个相同的占位符中,所有占位符都沿着幻灯片底部彼此相邻地排成一排。在 ph_with_text 函数被弃用之前,可以使用主体和索引参数来准确指定要插入文本的占位符。但是,我找不到使用较新的 ph_with 函数正确执行此操作的方法。

对于上下文,文本持有者的布局属性如下:

type id    ph_label             offx      offy       cx       cy
body 25    Text Placeholder 24  2.4526826 5.9722200  1.340278 0.7065978
body 26    Text Placeholder 24  4.2022332 5.9722200  1.340278 0.7065978
body 27    Text Placeholder 24  5.9965278 5.9722211  1.340278 0.7065978
body 28    Text Placeholder 24  7.7013342 5.9722200  1.340278 0.7065978
body 29    Text Placeholder 24  9.4496063 5.9722200  1.340278 0.7065978
Run Code Online (Sandbox Code Playgroud)

如果我使用 ph_location_label,我只能指定第一个,如下所示:

ph_with(location = ph_location_label(ph_label = "Text Placeholder 24"), value = "Blah blah"
Run Code Online (Sandbox Code Playgroud)

我可以使用position_right位置参数来指定最后一个:

ph_with(location = ph_location_type(type = "body", position_top = F, position_right = T), value = "Blah blah")
Run Code Online (Sandbox Code Playgroud)

但我对中间的 3 个非常困惑 - 我怎样才能指定这些占位符?有什么方法可以更改它们的 ph_label ,使它们不再都是“文本占位符 24”?

Lju*_*mov 5

解决方案是Alt + F10在 PowerPoint 中按主模板视图。您也可以按照Home > Arrange > Selection PaneBernardo 的建议通过 访问此菜单。这将打开模板中所有元素的标签,双击可以重命名它们。然后您可以在officer中使用您的自定义标签

ph_with(location = ph_location_label(ph_label = "Custom Label"), value = "Blah blah")
Run Code Online (Sandbox Code Playgroud)