Selected TOC style Name

Hi All,
Simple question for you...
How can I alert the selected TOC style name.
We are creating huge tool. Based on the selection Toc Style, we will process the multiple document.
For example I want to alert the Toc Style CCC(tick mark) name in this document.
Trying Code:
var myTocStyle = app.activeDocument.tocStyles.selectedIndex;
//~ var myTocStyle = app.activeDocument.tocStyles.item(-2);   //Dont want this concept
Very urgent request. Please help.
Thanks
Beginner_X

From:
myStory.storyType
you can determine that a story is a TOC, but how do you get from there to the TOC Style that was used to create said TOC?
This was the question that was bugging me back in CS3 days and I see no improvement in the CC object model. Stories don't have an associatedTOCStyle property. But maybe you can get at this by lateral thinking. If a story was created as a TOC then it has certain paragraph styles in it. If the TOC Styles are designed to have unique paragraph styles that identify the TOC Style, then you're home and dry. For example, you could have a ParagraphStyleGroup for each TOC Style and the name of that group could be the same as the name of the corresponding TOC Style.
Of course, this assumes you have control over the template for the project so that this relationship can be relied on. But given that, you can start with a text selection. Check the applied paragraph style, look at the name of its parent and bingo: there's the name of the TOC Style.
I'm not sure if this helps in your situation.
Dave

Similar Messages

  • TOC style template for epubs - where is it stored?

    Hello,
    some years ago I saved 3 different toc styles for my epubs. Now I added some more (for 2 levels etc.). This new ones also I saved.
    But when I start to build the epub in the first option windows at the point TOC style navigation there are still the old three templates to select. I'm not able to choose the new ones.
    Now I deleted in every dokument file the three old TOC styles by using the usual TOC tool. But in the epub-generator these templates are still there. With the result: the epub toc wich will be generated is wrong.
    Where are these templates stored?
    I use ID CC 2014.
    Thanks
    Detlef

    Hi Anshul,
    Thanks for your help. I export to epub 2.01 reflowable.
    For dokuments that might be so. But I do it with books and I deleted the TOC styles in ALL documents but it was still there in the list. Also I created a new book with all new dokuments, generates on TOC style in the first document and in the export option list there were the Default style only. It is not to figure out, where ID ist looking for that?
    Cheers
    Detlef

  • TOC style issue

    I'm working toward converting my book to an ePub.
    So, I created a new TOC style to pick up both the chapter number and chapter title on level 1.
    But the new TOC style only appears as an option with my TOC doc open. The new style doesn't appear as an option in my book chapter files.
    Is there a way to make the new TOC style available when opening another doc in my book?

    I would appreciate some clarification.
    I've attached a few screenshots.
    My style source is 03_chapter. So, do you mean to simply select the TOC doc as shown below, and then synchronize? Also, how would I know if the other styles in the TOC file are defined correctly?
    Thanks.
    All except Master Pages are checked.

  • TOC Style

    Though the TOC Style "Always Show Selection" has been checked but still in the generated chm file using RoboHelp 10 does not close the book.  When a user navigates from one link to another from topics, the related topic is not displayed.  The other books remain open, the related book from where the html file gets displayed is not displayed.  Can anyone help me with this.
    Soni

    Rick will still be in bed right now.
    What you are showing is a webhelp window. In theSSL pod, set Microsoft HTML help to be the default, unless you are using Rh10. Then go the Project Set Up pod and create a new window, in Rh 10 you will get an option for the window type.
    In the new window you will see the required option.
    Make sure you select that window when generating the help.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Two different TOC styles in one Pages document?

    I'm a new Pages 2.0.2 user with a large document with two different tables of contents 20 pages apart. I'm trying to format them differently using different TOC styles but when I change one's style the other one changes as well. Anything I do format-wise to one goes over to the other as well. I'm hoping this is just something I have yet to learn about the product. Any thoughts?
    iMac G5   Mac OS X (10.3.9)   1GB Memory

    Hi
    Someone else might know but this doesn't look good, taken from Pages Help:
    "Changing the appearance of text in a table of contents
    You can change the appearance of text in a table of contents and also add a leader line between a TOC heading and its associated page number.
    To change the appearance of text in a table of contents:
    Select the TOC heading you want to change. When you select a TOC heading, all the entries of the same heading type are automatically selected; headings cannot be individually selected.
    Click View in the toolbar, and then choose Show Styles Drawer.
    The Styles drawer displays a list of table of contents (TOC) styles. The TOC style that corresponds to the selected entry type is also selected.
    Do one or more of the following:
    To change the appearance of text, change it as you would format any paragraph text. For example, choose Format > Font or use the Text Inspector to make edits.
    To create leader lines from a TOC heading to its associated page number, click Inspector in the toolbar, click the Text Inspector button, and then click Tabs. Click the value for the TOC in the Tab Stops list, and then choose a line style from the Leader pop-up menu."

  • About TOC style add

    Hello,
    We want to add TocStyleEntry to our TocStyle using javascript.
    However tocStyleEntries.add accept string not paragraphystyle and we're tried with paragraphystyle name too.
    We have tried these codes, none of them are working in our case. (exception thrown like this paragraphystyle name is wrong)
    tocStyleEntries.add(variableOfParagraphyStyle);
    tocStyleEntries.add(variableOfParagraphyStyle.name);
    tocStyleEntries.add("Name of the Paragrapy STYLE");
    tocStyleEntries.add("Name of the Paragrapy STYLE (It's folder)");
    How we can obtain (or format) the string that tocStyleEntries.add function accept?

    @handifem – you have to use a string.
    So, options b or c could be right.
    Is the paragraph style nested in a paragraph style group?
    Then none of the proposed options will work.
    The syntax for nested paragraph styles would be:
    "NameOfGroup:NameOfDeeperNestedGroup:NameOfParagraphStyle"
    Build a TOC Style without scripting InDesign and ask for the names of all entries of all toc styles of the document:
    alert(app.documents[0].tocStyles.everyItem().tocStyleEntries.everyItem().name;);
    Uwe

  • New character style not showing up in TOC style

    I created a new character style called Subchapter....
    Then I went to layout>toc styles.. and hit [new]. Under "Style" my new character style "Subchapter" is not there. Also, under the "Styles in Table of Contents....include paragraph styles.." my new character style "Subchapter" is not in the other styles list.
    What am I missing?
    Thanks.
    Also, forgot to mention, I am in book mode at this point. Maybe I need to add that new character style to each .IDD chapter of the book?

    NEvermind, it was because I was making a character style, not a paragraph style. Now it shows up.
    Thanks anyways.

  • Display workorder   only related to   vendor selected in Vendor  name UDF

    Hi ,
    I am using SAP 2007 PL 18 ,
    In a Goods Issue Form I am  created two UDF 1) Vendor Name 2)  Work Order Nos .  
    Here queries related  Workorder No. Display workorder   only related to particular  vendor selected in Vendor name UDF  .
    Pl provide me FMS query.
    Thanks
    nitin

    Hi Nitin,
    My question is How you can know these Work orders are related to particular Vendor? Any relation is there between the Vendors and work orders?
    Also what you calling as Work Orders? I think it is Purchase Order?
    If it is PO, then try this
    Select T0.DocNum from ORDR T0 where T0.CardCode = $[$OIGE.U_BPCode] and T0.Status = 'O'
    The above query will show only the Open PO list. If you want all POs then remove the T0.Status condition.
    Regards,
    Bala
    Edited by: Balakumar Viswanathan on Jan 3, 2011 11:13 AM

  • TOC freakiness: Loading TOC style from other document reset my par styles [CS4]

    I loaded a TOC style into my layout (from a template doc), only to find that all my text formatting had reverted to that used in said other doc.
    This even affected styles not used in the TOC, such as body text.
    It appears that instead of just loading the TOC style, it is loading (and replacing) paragraph styles as well.
    Anyone else have this problem? Looks to me like a bug.

    Aaron,
    You probably already checked on this but, if some or all of your styles are Based On the paragraph style known as Basic Paragraph, then you could have this unfortunately fatal accident?
    Mike Witherell in Maryland

  • How to make the selection screen field names to apper as in logon language

    hai
    the selection screen field names should appear
    as that of logon language
    and <u>before that once i logon with a language
    it should pop up the (some)message in the logon language</u>.
    For the selection screen filednames to appear as that
    of the logon language whether i have to maintain the textelements for all screen fields in all possible languages or i have to write only in english and tell mentioning it to change

    In <b>SE38</b> --> Goto --> Translate.
    Choose target language, and start making the translation -;)
    Greetings,
    Blag.

  • Changing Paragraph Style Names

    I asked this question about a month ago, but I did't really ask it right.
    I am bringing documents from InDesign to InDesign6. In the process, we are changing style names to make things future compabile by eleminating all spaces. periods, dashes, etc.
    So, for example, Heading 1 becomes Heading_1, while Page No. - Left becomes PageNo_Left, etc. Easy enough to do for one or two documents by hand, but I have literally hunders of documents that are going to need this.
    So, I'm looking to write a script to more or less automate this process. I think I need something like:
         app.documents[0].paragraphStyle.item("Heading 1").name = "Heading_1"
         app.documents[0].paragraphStyle.item(Page No. - Left).name = "PageNo_Left"
         etc.
    Am I headed in the right direction? Any advice would be greatly appreciated.

    Figured it out. Script is:
    app.activeDocument.paragraphStyles.item("Heading 1").name = "Heading_1"
    app.activeDocument.paragraphStyles.item("Page No. - Left").name = "PageNo_Left"

  • [svn] 4368: Style name change: contentColor -- contentBackgroundColor.

    Revision: 4368
    Author: [email protected]
    Date: 2008-12-19 16:18:43 -0800 (Fri, 19 Dec 2008)
    Log Message:
    Style name change: contentColor --> contentBackgroundColor.
    QE Notes: Tests using contentColor need to be updated
    Doc Notes: None
    Bugs: ---
    Reviewer: ---
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/defaults.css
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxListSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxTextAreaSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxTextInputSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/SparkSkin.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/SparkColorStyles.as

    Revision: 4368
    Author: [email protected]
    Date: 2008-12-19 16:18:43 -0800 (Fri, 19 Dec 2008)
    Log Message:
    Style name change: contentColor --> contentBackgroundColor.
    QE Notes: Tests using contentColor need to be updated
    Doc Notes: None
    Bugs: ---
    Reviewer: ---
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/defaults.css
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ItemRenderer.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxListSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxTextAreaSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxTextInputSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/SparkSkin.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/SparkColorStyles.as

  • How to find paragraphs by using paragraph style name?

        How to get the Paragraph style UIDRef from paragraph style name.
    To find the paragraphs using Paragraph style i want UIDRef of paragraph style.Can some one help me..,

    IDocument *doc = GetExecutionContextSession()->GetActiveContext()->GetContextDocument();
    UIDRef ws = doc->GetDocWorkSpace();
    InterfacePtr<IStyleGroupManager> paraStyleNameTable(ws, IID_IPARASTYLEGROUPMANAGER);
    PMString styleName("someStyle");
    UID paraStyleUID = paraStyleNameTable->FindByName(styleName);
    if(paraStyleUID != kInvalidUID)
         //We found the style
         UIDRef styleRef(doc->GetDataBase(), paraStyleUID);

  • Extract paragraph style name with formating

    All
    kindly help me How to extract ParagraphStyle name with formating to Sample.txt:
    EG:
    Style Name: "Body"
    Font = "15"
    leading = '"18"
    Aligh = "Left"
    etc...
    Regards
    Hurix
    Edit by Dave Saunders: Something is preventing the Reply button from working. I'm hoping this edit will reactivate it.

    Hi all,
    This is something I threw together
    doc = app.activeDocument,
    ps = doc.paragraphStyles.everyItem().getElements().slice(0),
    l = ps.length,
    paraStyles = [],
    c = 0;
    while (l--) {
        var styleDetails = [], n = 0, s, x, p, q;
        s = ps[l].properties;
        for (x in s) {
            p = (s[x] && s[x].hasOwnProperty ("name")) ? s[x].name : s[x]; // change according to requirements.
            if (p && p.constructor.name == "String") p = '"' + p +'"'; // ok if the sctring doesn't contain a " mark
            else if (x == "tabList") p = getTabList (s[x]);
            else if (p instanceof Object && p.constructor.name != "Enumerator") {
                var objProps = [], z = 0;
                for (q in p) objProps[z++] = q + ": " + p[q]
                p = x + " {" + objProps.join(", ") + "}";
            styleDetails[n++] = x + ": " + p;
        paraStyles[c++] = "{" + styleDetails.join(", ") + "}";
    temp = new File (Folder (Folder.temp) + "/" + doc.name + " Paragraph Style Properties  " + ("" + new Date).replace(/:/g,"\xB7").replace(/\s\S+$/,"")+ ".txt");
    temp.encoding = "UTF-8";
    temp.lineFeed = ($.os[0]=="M") ? "Macintosh" :" Windows";
    temp.open('w');
    temp.write("\uFEFF" + paraStyles.join("\r"));
    temp.close();
    $.sleep(300);
    temp.execute(true);
    function getTabList (t) {
        var tl = t.length, n, pTabList = [];
        for (n = 0; n < tl; n++) { // if the leader etc. contains a " then you have to use ' instead of "
            pTabList[n] = "({alignment: " + t[n].alignment + ', alignmentCharacter: "' + t[n].alignmentCharacter + '", leader: "' +t[n].leader +  '", position: ' + t[n].position + "})";
        return "[" + pTabList.join(", ") + "]";
    function getGrepList (g) { // nestedGrepStyles
        return // couldn't be bothered to do this one, sorry
        var tl = g.length, n, pnestedGrepList = [];
        for (n = 0; n < tl; n++) { // if the leader etc. contains a " then you have to use ' instead of "
            // pTabList[n] = figure for yourself
        return "[" + pTabList.join(", ") + "]";
    You can then recreate the styles by splitting the string by "\r" and using doScript or Eval.
    Might be better to produce a tagged doc with <alignment> foo </alignment> type structure to get around quotation porblems
    However for a simple import export snippet wouldn't this be better?
    var doc = app.activeDocument,
          newDoc = app.documents.add(),
          fp;
    // if you need to add function to remove app.styles that are automatically added to the new document
    fp = new File (Folder.temp + "/" + +new Date + ".indd")
    doc.saveACopy (fp);
    $.sleep (500);
    newDoc.importStyles (ImportFormat.TEXT_STYLES_FORMAT, fp); // can add all sorts of things to import or load
    fp.remove();
    // You now have a clean new Document to load the styles from using importStyles
    Trevor

  • How to find text or paragraph by giving style name?

    Hello,
    can any body tell me,How to find text or paragraph by giving style name?actully i have so many styles which is applied on document.
    i want to find text in the document which have particular style name.is any method to find text by giving name of style?

    Any of the various findText methods, plus your paragraph style name in FindTextPreferences: http://jongware.mit.edu/idcs5js/pc_FindTextPreference.html
    Use Google to locate exact samples, as this has been done countless times before.

Maybe you are looking for

  • OIF Authentication Failing - UserID : anonymous - Internal Error

    Hi, We have implemented SSO in our environment. After credentials are entered in the login page (protected by OAM), we get 500 internal server error on the browser. In the OIF logs, we see the following exception: [2013-01-17T04:27:24.730-05:00] [wls

  • I can't delete a keyword plus Lightroom now automatically displays keyword folders

    Lightroom has suddenly started behaving oddly with regard to keywords and I can't seem to find reference to it anywhere, even if it is "switch" that I have accidentally turned on. In my set up, I have, for example, the keyword "Portrait" stored under

  • Capacitor simulation error

     Hi; I Have an problem; When simulating  "time step too small " often occurs;  After Using Convergence Assistant; I can simulate but the output of XSC1 is not corrent , It include direct flow, The capacitor C1 not filter dirent flow. and in "alteract

  • Failed to clean up BI delta queue before applying enhp1

    Experts: Happy Holiday! During applying enhp1 on BI7.0, we get the error that BW delta queue was not clean up before starting enhp1: 1) I remember I did do the clean up per the guide, why it complains? Should I do it in certain way? 2) how to fix it

  • FTP to Mainfrome system

    Hi There, I have request to FTP some files to main frame systems from a UNIX file system, i tried regular ftp 'snpsftp.py' which comes with ODI, did not help so i customized it to FTP to a main frame system. But as you know in main frame systems the