Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inserting a TC field #449

Open
ghosttie opened this issue Jan 20, 2023 · 1 comment
Open

inserting a TC field #449

ghosttie opened this issue Jan 20, 2023 · 1 comment

Comments

@ghosttie
Copy link

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?

@XceedBoucherS
Copy link
Collaborator

Hi,
Upon further investigation, we currently do not offer a way of adding TC field in an MS Word document. We did however create a feature request for this in the future.

Maybe, the easiest way for you right now, would be to make sure each document to be merged starts with a known heading. This way the Table of Content would be able to list the different documents and link to them.
You can set the heading of a paragraph easily with something like:
paragraph.StyleId = "Heading1";

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants