• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ExtendedScript vs. TOCManager

Guest
May 04, 2015 May 04, 2015

Copy link to clipboard

Copied

Is there any access to the "TOC Book Properties" via scripting?

Reason: When I import from word and a header has a trailing number, the TOC entry is missing this number. So I thought I can fix this via scripting, but I cannot find a way to access the entry at all?

TOCManger just returns the entire TOC but not the entries?

Views

170

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 04, 2015 May 04, 2015

This is a little strange yes. To get to the TOC entries, you have to get the full file path and then you can read/write the files. SInce the file is in XML format, you can use the TokenManager to traverse the XML. Alternatively, you can use ExtendScript's XML support and use XPATH. Simply traversing the XML with the TokenManager is the easiest way to parse the TOC entries (though not the fastest).

Votes

Translate

Translate
LEGEND ,
May 04, 2015 May 04, 2015

Copy link to clipboard

Copied

This is a little strange yes. To get to the TOC entries, you have to get the full file path and then you can read/write the files. SInce the file is in XML format, you can use the TokenManager to traverse the XML. Alternatively, you can use ExtendScript's XML support and use XPATH. Simply traversing the XML with the TokenManager is the easiest way to parse the TOC entries (though not the fastest).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 04, 2015 May 04, 2015

Copy link to clipboard

Copied

LATEST

What a cool idea! Thx a lot!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp