如何使用 Google Apps 脚本获取 google docs 文档的背景颜色?

问题描述 投票:0回答:0

正如标题所说,我想获取Google docs文档的背景颜色(不是段落的背景而是整个文档的背景)。

我试过使用以下代码:

DocumentApp.getActiveDocument().getBody().getAttributes()[DocumentApp.Attribute.BACKGROUND_COLOR]

不幸的是,此方法调用仅返回 null 而不是背景颜色。 欢迎任何想法我可以使用什么方法。

google-apps-script google-docs google-docs-api
© www.soinside.com 2019 - 2024. All rights reserved.