inserting a TC field

Open
#449 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
tooling

Research direction

Start by tracing the TableOfContentsSwitches.F handling and the document insertion flow described in the issue. Determine whether DocX exposes field insertion before documents are merged, then verify that a TC field using the document title is preserved and resolved by the generated table of contents.

Written by the indexing model from the issue text.

Description

My overall goal is to merge several documents together, with a table of contents at the beginning with links to each document.

I can add the table of contents, and I can insert the documents, but I can't figure out how to create TC fields for the table of contents to use.

The table of contents is using the switch

TableOfContentsSwitches.F, "p"

but I need to be able to insert a field with the text TC ""{documentTitle}"" \f p at the beginning of each document before I insert it, and I can't see any way to do that.

Is this possible, and if so, how?

Dominant language
C#
Stars
1.9k
Forks
483
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xceedsoftware/DocX

All issues in xceedsoftware/DocX

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.