メインコンテンツへスキップ

Word の目次を更新します Power Automate

PDF4me 目次を更新 は Power Automate Word文書の見出しをスキャンし、目次を自動的に生成または更新する機能です。Wordを開かずに、技術マニュアル、学術論文、長文レポートなどに、文書がワークフローに組み込まれた瞬間に、クリック可能なプロフェッショナルなナビゲーションを追加できます。

このアクションが何をするか

PDF4me 目次を更新 設定された範囲内の Word 文書の見出し 1 から見出し 6 までのスタイルを読み取り、既存の目次フィールドを更新するか、文書の先頭に新しい目次フィールドを作成します。ハイパーリンク、タブリーダー、大文字/小文字、およびロケールを制御します。

関連ブログ記事
この機能に関するブログ記事はまだありません。近日公開予定です。
その間、PDF4me ブログを閲覧して、あらゆるプラットフォームのチュートリアルやワークフローをご覧ください。
ブログをご覧ください →

認証 API リクエスト​

アクセスするには PDF4me ウェブ API を通して Power Automateすべてのリクエストには有効な API キー。認証によって本人確認が行われ、コネクタがフローからPDF4meのWord TOCサービスにアクセスできるようになります。

見逃してはならない重要な事実​

既存の目次を更新するか、新しい目次を作成します。
この処理では、まず既存の目次フィールドをスキャンします。存在しない場合は、文書の先頭に「目次」というタイトルの新しい目次フィールドを挿入します。
3つのフィールドは詳細パラメータとしてグループ化されています
タブリーダーを非表示にする、大文字を使用する、およびカルチャー名の設定は、コネクタの高度なパラメーター切り替えの背後にあり、メインフォーム上にはありません。
見出しレベルは範囲指定と複数範囲指定をサポートします
範囲を指定する場合は「1-3」、単一レベルを指定する場合は「1」、隣接しない範囲を1つの目次にまとめる場合は「1-2,4-6」を使用してください。
Power Automate PDF4me Word の目次更新アクションには、ファイルコンテンツ、ファイル名、見出しレベル、ハイパーリンクの使用、および詳細パラメーターパネルが表示されます。

ファイルの内容、ファイル名、見出しレベル、ハイパーリンクの使用はメインフォームに配置されています。タブリーダーの非表示、大文字の使用、カルチャ名は詳細設定パラメータです。

パラメータ​

必須: ファイルの内容とファイル名は必ず指定する必要があります。見出しレベルとハイパーリンクの使用にはデフォルト値が設定されており、タブリーダーの非表示、大文字の使用、カルチャ名はオプションの高度なパラメータです。

パラメータ必須その機能例
File ContentOptionalContent of the Word document to process. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.@{body('Get_file_content')?['$content']}
File NameOptionalName of the Word document, including its extension (for example `contract.docx`).contract.docx
Heading LevelsOptionalHeading levels to include (e.g., "1-3", "1-6"). Defaults to `1-3`.1-3
Use HyperlinksOptionalInclude hyperlinks in table of contents. Defaults to `Yes`.Yes
Hide Tab LeaderOptionalHide tab leader dots in table of contents. Defaults to `Yes`.Yes
Use UppercaseOptionalUse uppercase for table of contents entries. Defaults to `Yes`.Yes
Culture NameOptionalCulture name for localization (e.g., "en-US", "de-DE").your value

目次を更新すると何が返されますか?​

分野タイプ内容物
Processed File ContentFile contentContent of the Word document with the updated table of contents. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file. The response contains no file name, so name the file yourself, for example with the input file name.
SuccessYes/NoWhether the operation completed successfully
Error MessageTextError message if operation failed
Error DetailsArrayList of detailed error messages
{
"document": "<file content>",
"Success": true,
"ErrorMessage": null,
"Errors": []
}

よくあるエラーメッセージ​

エラーメッセージ原因解決
Request is emptyRequest object is null.Provide a valid request object.
Document is emptyDocument object is null.Provide a valid Word document.
Error loading document from bytesInvalid or corrupted Word document.Verify the input document is a valid Word file (.docx).
No headings found in documentDocument has no heading styles applied.Apply Heading 1 through Heading 6 styles to the sections that should appear in the TOC.
Invalid heading levels specifiedHeading Levels contains an invalid format.Use a valid format such as "1-3", "1", or "1-2,4-6".
Invalid culture name providedCulture Name is not a recognized locale.Use a valid culture code such as en-US or fr-FR.

目次を更新するにはどうすればいいですか? Power Automate?​

  1. 追加 PDF4me → 目次を更新 あなたの Power Automate 流れ。
  2. 地図 ファイルの内容 そして ファイル名 以前のアクションから、例えば SharePoint または OneDrive ファイルの内容を取得します。
  3. セット 見出しレベル 含める見出しスタイルの範囲、 ハイパーリンクを使用する エントリがクリック可能かどうかを制御する。
  4. 開ける 詳細パラメータ ドキュメントにデフォルト以外のタブリーダー、文字ケース、または特定の文字が必要な場合 文化名 地元。
  5. フローを実行する。 PDF4me 目次を更新または作成し、Word 文書を返します。 document。

どの見出しレベル範囲を使用すべきですか?​

使用 「1-3」は、ほとんどのビジネス文書やレポートのデフォルトです。これは、細かいサブ見出しを取り込まずにセクションとサブセクションの見出しをキャプチャするためです。 「1-6」のようなより広い範囲 複雑な法律文書や技術文書で、深いネスト構造をナビゲートする必要がある場合に使用します。 「1-2,4-6」のような複合範囲 文書のレベル3の見出しが装飾的または反復的であり、その下のより深い構造を捉えつつもスキップする必要がある場合。

典型的な構成​

ワークフローの例Common Power Automate flow patterns using Update Table of Contents.
技術マニュアルの自動索引作成
  1. 技術マニュアルがアップロードされるとフローがトリガーされます SharePoint 「マニュアル」ライブラリ。
  2. 「ファイルの取得」は、アップロードされたWord文書を取得します。
  3. 目次の更新は、見出しレベルを「1~4」に設定し、ハイパーリンクの使用を「はい」に設定した状態で実行されます。
  4. 索引付きのマニュアルは図書館に保存され、読者はセクション間を簡単に移動できるようになります。
学術論文の書式基準
  1. 研究論文投稿フローに新しい原稿が投稿されました。
  2. 目次を更新する際は、見出しレベル「1~3」、タブリーダーの非表示、大文字の使用を「はい」に設定して、部門の書式設定基準に合わせます。
  3. 標準化された論文は、評価のために審査委員会に送付される。
地域に根ざした文書配布
  1. 国際的な文書の流れでは、翻訳されたWordファイルが地域事務所向けに準備されます。
  2. 目次の更新は、標準の見出しレベルとハイパーリンクの使用設定に加えて、カルチャ名を対象ロケール(例:「de-DE」)に設定した状態で実行されます。
  3. 地域に合わせて最適化され、操作しやすいドキュメントが、地域チームに配布されます。

実践的なヒント​

Apply real Word heading styles before running the action
The TOC is built from Word's Heading 1 through Heading 6 styles, not from bold text or larger font sizes. A document with no styled headings returns a "no headings found" error.
Open Advanced parameters to reach three of the seven fields
Hide Tab Leader, Use Uppercase, and Culture Name are not on the connector's main form. Expand Advanced parameters in the designer to set them.
Test the Heading Levels format on one document first
A malformed range like "1,3" instead of "1-3" or "1,3-4" returns an invalid heading levels error. Confirm the format on a sample file before wiring it into a production flow.
Re-run on documents with an existing TOC to refresh page numbers
The action detects and updates an existing TOC field rather than duplicating one, so it is safe to re-run after content changes shift page numbers.
Match Culture Name to the document's actual language
An unrecognized or mismatched culture code returns an invalid culture name error; use standard codes like en-US or fr-FR rather than a free-text language name.

チートシート​

分野価値
ActionUpdate Table of Contents
File Content / File NameMapped from a prior action, .docx or .doc
Heading Levels"1-3" default, or "1", or "1-2,4-6"
Use HyperlinksYes (default) or No
Advanced: Hide Tab LeaderYes (default) or No
Advanced: Use UppercaseYes (default) or No
Advanced: Culture Namee.g. en-US, de-DE, blank for none
No headings foundApply Word Heading 1-6 styles first
Outputdocument (Base64 Word), Success, Error Message, Errors

よくある質問​

How do I automatically generate a Table of Contents in Word with Power Automate?+
Add the PDF4me Update Table of Contents action, map File Content and File Name from a prior action, then set Heading Levels to the range of heading styles to include, for example 1-3. The action scans the document's headings, updates an existing TOC field or creates a new one, and returns the updated Word file.
What happens if the document does not already have a Table of Contents?+
The action creates a new Table of Contents at the start of the document, adding a "Table of Contents" title in the Heading1 style, built from the headings that fall within the configured Heading Levels range.
Which Word heading styles does the Table of Contents pick up?+
The action reads Word's built-in Heading 1 through Heading 6 styles. Heading Levels controls which of those levels are included, using a range like 1-3, a single level like 1, or multiple ranges like 1-2,4-6.
Can I control hyperlinks, tab leaders, and letter case in the generated TOC?+
Yes. Use Hyperlinks makes TOC entries clickable links to their headings. The Advanced parameters Hide Tab Leader control the dotted line between entry text and page numbers, and Use Uppercase controls whether entries render in uppercase or their original case.
What is the Culture Name parameter for?+
Culture Name sets a locale such as en-US or de-DE for document processing and metadata, useful when generating a Table of Contents for a localized or multi-language document. See <a href="https://learn.microsoft.com/en-us/globalization/locale/locale-names" target="_blank" rel="noopener noreferrer">Microsoft's locale name reference</a> for valid culture codes.
Is there a similar action for headers and footers instead of a TOC?+
Yes, see the PDF4me Update Headers Footers action linked under Related Actions below. See <a href="https://learn.microsoft.com/en-us/connectors/pdf4me/" target="_blank" rel="noopener noreferrer">the PDF4me Power Automate connector reference</a> for the full action list.

業界におけるユースケースとアプリケーション​

法律業界における活用事例

  • 契約ナビゲーション: 複雑な複数セクション契約書の詳細な目次を作成する
  • 法律概要: 長文の裁判文書をナビゲートしやすい構造にする
  • コンプライアンスマニュアル: 規制要件と手順を索引化
  • 事例記録証拠の要約と法的論拠を整理する

関連アクション​

他のプラットフォームでの同じタスク​

ヘルプが必要な場合​