跳到主要内容

使用以下方法更新 Word 中的目录 Zapier

更新目录 是一个 Zapier 采取行动 PDF4me 刷新或创建 TOC 在 Word 文档中检测一个字段,该字段已存在。 TOC 如果找不到匹配项,则生成一个新的。在报告编辑、手动发布或文档组装后触发此功能,以确保在发布文件之前标题级别、超链接和页码准确无误。

相关博客文章
目前尚无关于此功能的博客文章——敬请期待。
在此期间,您可以浏览 PDF4me 博客,查看适用于各平台的教程和工作流程。
访问博客

我如何验证我的身份 API 要求?

要访问 PDF4me 网站 API 通过 Zapier每个请求都必须包含正确的身份验证凭据。身份验证可确保通信安全,并验证您作为授权用户的身份,从而实现与您的系统之间的无缝集成。 Zapier 工作流程和 PDF4me的强大话语 TOC 管理服务。

PDF4me 更新目录 Word Zapier 配置 - 文件,文件名 abc.docx,标题级别 1-3,使用超链接 False,隐藏制表符前导符 False,使用大写 True,区域名称 en-Us
配置更新目录:映射文件和文件名、设置标题级别、使用超链接、隐藏制表符前导符、使用大写字母和区域名称。

您不容错过的重要事实

仅需文件即可。
截图证实,“文件”是唯一带有星号的字段。 Zapier UI文件名、标题级别、使用超链接、隐藏制表符前导符、使用大写字母和区域名称均为可选。
检测并刷新,或创建一个新的 TOC
如果文档已经存在 TOC 如果该字段不存在,则会根据您的标题级别和格式设置创建一个新字段。
标题级别控件 TOC 深度
诸如“1-3”之类的范围字符串仅包含该深度范围内的标题,涵盖 Word 的整个标题 1 到标题 6 范围。

配置概览

示例配置来自 Zapier 界面

屏幕截图显示,文件映射自上一步,文件名“abc.docx”,标题级别“1-3”,使用超链接和隐藏制表符前导符设置为“否”,使用大写字母设置为“是”,区域名称为“en-Us”。

文件

从步骤绘制地图

标题级别

1-3

使用超链接

错误的

隐藏标签页领导者

错误的

使用大写字母

真的

:::提示:使用上一步中的映射文件

使用 + 旁边的按钮 文件文件名 要从之前的 Zap 步骤(例如,Google 云端硬盘、Dropbox 或触发器)进行映射。Word 文件必须提供完整内容,而不是“存在但未显示”的引用。

:::

:::警告 文件:(存在但未显示)

如果在“文件”字段中看到“文件:(存在但未显示)”并出现错误,请选择提供相应选项的选项。 完整文件内容 相反。参见 Zapier & Power Automate 尖端 详情请见下文。

:::

参数

“更新目录”操作的完整参数列表。参数名称与……匹配。 Zapier 配置 UI

必需 Zapier UI 仅文件。文件名、标题级别、使用超链接、隐藏制表符前导符、使用大写字母和区域名称均为可选。

范围必需的它的作用例子
FileRequiredWord document content, mapped from a previous step using full file content.[4. File from Step 4]
File NameConditionalFilename with .docx or .doc extension, used for output naming.abc.docx
HeadingLevelsConditionalRange of heading levels to include in the TOC, from 1 through 6.1-3
Use HyperlinksConditionalBoolean toggle for clickable TOC entries that jump to each heading.False
Hide Tab LeaderConditionalBoolean toggle to hide the dot leaders between TOC text and page numbers.False
Use Upper caseConditionalBoolean toggle to render TOC entry text in uppercase.True
Culture NameConditionalCulture or locale code affecting language and formatting conventions.en-Us

输出结果包含哪些字段?

该操作返回修改后的 Word 文档以及跟踪元数据。此输出格式在以下位置共享: PDF4me 词语动作 Zapier 返回一个文件。

场地类型它包含什么
Job IdStringUnique identifier for the Zapier job execution.
File UrlURLAPI endpoint to download the Word file with the updated TOC. Map this to the next step, Drive, Dropbox, or another PDF4me Word action.
Alternate File UrlURLAlternate download URL with the filename in the path.
File NameStringBase filename without extension.
Full File NameStringComplete filename including extension.
File ExtensionStringFile extension of the output, typically .docx.

典型配置

工作流程示例Common Zapier workflow patterns using Update Table of Contents.
刷新 TOC 报告修改后
  1. 当生成的报告文档落入云端硬盘或 Dropbox 文件夹时,就会触发一个触发器。
  2. 更新目录时,标题级别设置为“1-3”,使用超链接设置为“真”,因此 TOC 页码和链接反映的是最终内容。
  3. 更新后的报告已上传至共享报告文件夹,供分发。
生成一个 TOC 手册出版前
  1. 技术手册被标记为已准备好发布,触发了 Zap。
  2. 更新目录时,标题级别设置为“1-4”,以便进行更深层次的导航;使用大写字母设置为 True,以获得正式的印刷外观。
  3. 已准备好出版的手册将通过电子邮件发送给出版团队。
刷新 TOC 合并文档后
  1. 在 Zap 中,多个 Word 文档已使用以下方式合并: PDF4me 合并操作。
  2. 更新目录功能在合并后的文件上运行,标题级别设置为“1-2”,以便对合并后的部分进行概览。
  3. 包含准确信息的综合文件 TOC 已归档到存储文件夹。

实用技巧

Map full file content, not a reference
If File shows "Exists but not shown", pick the mapping option that provides full file content, or the action can fail to process the document.
HeadingLevels uses a simple range string
Set HeadingLevels to a value such as "1-3" to include Heading 1 through Heading 3 styles. Word supports heading levels 1 through 6.
Hide Tab Leader only removes the dot leaders
Hide Tab Leader controls the dots between TOC text and page numbers. It does not remove page numbers themselves.
Use Upper case affects TOC text only
Use Upper case renders the TOC entry text in capitals. It does not change the case of the actual heading text in the document body.
Existing TOC fields are refreshed, not duplicated
If the document already contains a TOC field, this action updates it in place instead of inserting a second, duplicate table.

速查表

场地价值
ActionUpdate Table of Contents
File[mapped from previous step, full content]
File Nameabc.docx
HeadingLevels1-3
Use HyperlinksFalse
Hide Tab LeaderFalse
Use Upper caseTrue
Culture Nameen-Us

常见问题解答

How do I update a table of contents in a Word document using Zapier?+
Add the PDF4me Update Table of Contents action to a Zap, map File with full file content, set HeadingLevels and the formatting toggles, and run the Zap. See Microsoft's guide to updating a table of contents for how the same refresh works manually inside Word.
What happens if the Word document has no existing table of contents?+
The action detects whether a TOC field already exists. If one is found, it refreshes that field in place; if none exists, it generates a new TOC field using your HeadingLevels and formatting settings. See Microsoft's guide to inserting a table of contents for how a first-time TOC is normally created.
Why isn't my table of contents showing hyperlinks?+
Use Hyperlinks controls this and defaults to False in the example configuration. Set Use Hyperlinks to True in the Zapier field to make TOC entries clickable links that jump to each heading.
Can I control which heading levels appear in the table of contents?+
Yes. HeadingLevels accepts a range string such as "1-3" to include only Heading 1 through Heading 3 styles, across the full 1-6 heading level range Word supports.
Does Culture Name affect the table of contents formatting?+
Culture Name sets the locale used for document processing, such as en-US or de-DE, which can affect language and number formatting conventions in the output. It is optional and can be left blank for default handling.

相关操作

在其他平台上执行相同任务

行业应用案例及应用

  • 技术手册出版: 更新 TOC 在出版前,技术手册中应包含 4 级导航。
  • 图书出版: 刷新 TOC 最终编辑后的稿件中带有超链接
  • 用户指南更新: 更新 TOC 用户指南在内容修订后
  • 目录制作: 刷新 TOC 更新后,产品目录中带有标签页引导线。
  • 报告发布: 更新 TOC 在年度报告分发前

获取帮助