You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过AppleScript在PowerPoint中为选中形状设置完全无填充?

在PowerPoint中用AppleScript实现形状无填充的方法

PowerPoint的AppleScript接口里,fill format type是只读属性,直接设置为none无法生效。要实现和界面点击“无填充”完全一致的效果,需要对形状的填充对象执行delete操作,具体代码如下:

tell application "Microsoft PowerPoint"
    set selectedShapes to selection of active window
    repeat with aShape in selectedShapes
        delete fill of aShape
    end repeat
end tell

这段代码会遍历当前窗口中选中的所有形状,对每个形状的填充对象执行删除操作,彻底移除填充效果,此时形状的fill format type会变为fill unset,和手动设置无填充的状态完全一致。

内容的提问来源于stack exchange,提问作者RightWrite

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 15:44:55