Create TOC on active page

Hello Scripters,
I am trying to create my toc on the fifth page of my document.
At the moment the script is running I am adding the fifth page and scripting like this:
function toc() {
    var myTOCStyle = myDocument.tocStyles.itemByName("TOC_normal");
    var myTocPage = myDocument.pages.add(LocationOptions.AT_END);
    var myBounds = myGetBounds(myDocument, myTocPage);
    var myX1 = myBounds[1];
    var myY1 = myBounds[0];
    var myStory = myDocument.createTOC(myTOCStyle, true, undefined, [myX1, myY1]);
the script creates the toc on page 4 with bounds of page 5 (right page).
doesn't the script always creates the toc at the active page? this should be page 5, as it was just added?
I do not want to move the toc-frame after creating it, I want the script to place the toc on the correct page, what's wrong with my code?
Thanks a lot in advance for any answer,
franzi_ska

From this point of view you're right, I have to find a workaround to avoid the problem (but I still want to knwo what's the problem about my script).
I tried your suggestion:
var myStory = myDocument.createTOC(myTOCStyle, true, undefined, [myX1, myY1]);
var myFrame = myStory.textFrames[0];
myFrame.move(myTocPage);
Now the problem lies in the 2nd line (Object is undefinied).
I think var myFrame = myStory[0].textFrames[0]; is right as the toc returns an array of story.
So the problem still excists...
In any case: Thank you very much for helping me!

Similar Messages

  • How to create a new Activity with report

    I would want to know how I do to create a link in a report that connects me to the page of the Client to add a new record of activity if i want.
    Substantially this link allows me to create a new activity in an agency that I directly select from the report.
    Thank Vale.

    Hi
    You should use the observer user for performing read-only operations.
    This is one of the users that is created when you installed AccAD.
    Here is the section that mentions it from our administration guide:
    You are asked to provide passwords for the root, admin, and observer
    users. Make note of these passwords since you will be required to provide them later.
    When the installation is complete, log out root and log on again as admin.
    Important
    Perform any additional operations using the secured admin account. You can use the observer account to access the AccAD Administrator web UI in read-only mode only; this user cannot log on to the machine.
    Best,
    Zeev

  • View enable and disable dynamically in Guided activity page

    Hi Team,
    I have created a GP and it contains 2 views inside a Guided activity page.
    Here the issue is I need to show both the views but I should be able to disable any one of the view dynamically.
    Note:
    As I said earlier it should not disappear. It should just be disabled.
    I have tried using do config determination with different configurations but it is making the views disappear.
    Especially the first view...!
    Please help.
    Thanks,
    Mahesh Pusala

    Hello Mahesh,
    You can check below methods in _IMPL class of the over view page.
    DETACH_STATIC_OVW_VIEWS: to hide any view
    REATTACH_STATIC_OVW_VIEWS : to display the view
    for hiding the view delete the view entry from the internal table " rt_return" in the "DETACH_STATIC_OVW_VIEWS" method.
    to show a view add the view name including component name to the "rt_return" table in "REATTACH_STATIC_OVW_VIEWS" method.
    hope this helps you.
    Br,
    Navn

  • Is there TOC feature in Pages for iPad?

    Is there TOC feature in Pages for iPad?

    I think it not an unreasonable feature request for a word prcessor. I feel that in scaling pages down to the iPad Apple has also made the product a little less attractive for professional usage. For example pages for iPad really should preserve Endnotes created elsewhere, but it does not at present. A shame, but we can hope that in subsequent versions of pages for iPad that support or preservation of advanced word processing features is introduced.

  • Navigation menu active page color not behaving as it should

    I created an unordered list for the mainnav links. I use the following lines in the code:
    <li><a href="../index.html" class="thispage">Home</a></li>
            <li><a href="#">Events</a></li>
            <li><a href="#">Music</a></li>
            <li><a href="#">Agenda</a></li>
            <li><a href="../Pages/artists.html">Artists</a></li>
    The Home button shows the color for 'active', but if I go to the artists page it first shows the hover color, then the page opens but does not show the active color.... I.o.w. the Home button stays on active though it is not active.
    Please see the effect on my testsite: www.adrianrooymans.nl

    armona22 wrote:
    I'm sorry, but I tried that already, and it does not solve the problem. If I do that I get TWO active pages, but clicking anywhere on the artists page makes the blue color go away, except for the Home button.... I could temporarily put that on the testserver so that you could see what happens (unless you beleive me).
    You will get two active menu items unless the class is removed from the links that you don't want it on.
    If you look at the example page code in the 'completed' folder of the Bayside Beat tutorial you will see on the 'index' page the class has been added to the 'index' link:
    <nav id="mainnav">
          <ul>
            <li><a href="index.html" class="thispage">Home</a></li>
            <li><a href="sightseeing.html">Sightseeing</a></li>
            <li><a href="#">Eating Out</a></li>
            <li><a href="#">What's On</a></li>
            <li><a href="#">Where to Stay</a></li>
          </ul>
        </nav>
    Whilst on the 'sightseeing' page the class has been moved to the 'sightseeing' link:
    <nav id="mainnav">
            <ul>
                <li><a href="index.html">Home</a></li>
                <li><a href="sightseeing.html" class="thispage">Sightseeing</a></li>
                <li><a href="#">Eating Out</a></li>
                <li><a href="#">What's On</a></li>
                <li><a href="#">Where to Stay</a></li>
            </ul>
        </nav>

  • TOC problem in pages

    Hello friends,
    I just purchased the iWork 08 package because i just want to avoid MS office. Hence, when i tried to open my thesis in word format, the pages seems cannot recognise most of the tables, text boxes, and most importantly the table of content and it says the inspector cannot recognize the heading formats in the word documrnt. Is it mean that I need to redefine all the headings and sub-headings int he document in order to use the TOC function in pages 08?
    I tried to open a test document in pages 08, then type something and define some lines as headins, follow the instruction to open the inspector and select desired heading levels for the TOC, hence in the sections button of the format bar, it does not have any option to create a TOC as described in the tutorial from Apple, instead it has only two options, a blank page or a text page, is it anything wrong with the pages 08? what is the correct way to create a TOC in pages and to import one from my old Word documents?
    Please help...
    Tony.

    Colin,
    One of the first comments I made in this discussion group an hour after purchasing iWork '08 was my confusion about the difference between the two modes. After using it for months now, I've come to the conclusion that it's a response to the insanely huge amount of tech support calls they must have gotten from people wanting to know why they couldn't drag and move objects in Pages 2. Apple must have gotten tired of explaining to people the difference between Fixed On Page (now called Floating) and Moves With Text (now called Inline). My guess is that it was easier for Apple to add a Page Layout mode in which all objects are defined as Floating, since Inline objects can only appear on a text layer. Apple simply chose to remove the text layer, thus eliminating Inline objects that can't be dragged, thus eliminating 90 percent of their tech-support calls. Truthfully, I preferred the old way, but then I'm on this discussion group every day and have the opportunity to learn little proactive tricks like clicking in the gray margin area to make the cursor disappear, then inserting an object. Or REactive tricks like selecting the object, then going to the Wrap inspector to change it from Inline to Floating. These are things that aren't very intuitive to new users, and I can understand their confusion. Apparently, Apple can, too.
    -Dennis

  • Examples of chart in the report column like monitor activity page

    Hello,
    Can anybody help me how to create a report having chart as one of the column in the report like Administration->Monitory Activity pages.
    I have a report having columns like date, salesman, collection%.
    The collection% must be displayed as bar chart showing % in the report column itself.
    I searched a lot and end up with no examples found for this kind of example.
    Any help will be appreciated.
    Thanks,

    First of all, it appears that there is no "HTML EXPRESSION" or an area to assign a CSS class to a column for interactive reports. I've even tried to use "COMPUTE" on an interactive report to introduce the <DIV> tabs and style, but that doesn't seem to work either. So If you're using an interactive report, it looks like you're out of luck.
    But if you use a standard report, here is a quick example using the standard Demo tables on an interactive report. I'll do my best to describe what I'm doing step by step.
    The query I'm using is a simple list of employees that shows the following columns:
    <ul>
    <li> EMPNO
    <li> ENAME
    <li> JOB
    <li> SAL
    <li> COMM
    <li> COMM / (SAL + COMM) *100 (What percent of total Salary is the employees Commission)
    </ul>
    So here is the SQL statement I'm going to use:
    select empno, ename, job, sal, comm, round(nvl((comm / (sal + comm) *100),0)) Pct_Comm
    from empNow, Create an standard (SQL) report on the page of your choice by selecting the CREATE button at the top of the page editor. Select "REGION ON THIS PAGE" => "REPORT" => "SQL REPORT"
    Enter a the TITLE and TEMPLATE of your choice, then click the NEXT button.
    Copy and paste the select statement above into the page region for the select statement, and press the CREATE REGION button.
    Go ahead and run the report and you will see a whole number for the COMM_PCT.
    Now to turn this into a graph within the column perform the following steps.
    <ol>
    <li>Edit the page and then edit the report by clicking on the "Report" link on the page definition. This will bring up the Report Attributes Page.
    <li>Edit the PCT_COMM column by clicking on the EDIT icon at the beginning of the row.
    <li>Cut and paste the html from my above post into the "HTML EXPRESSION" field.
    <li>Edit the HTML you just pasted to remove any unnecessary spaces in the tags that might cause it to render incorrectly.
    <li>In the HTML EXPRESSION string, replace the #COLLECTION_PCT# string with #PCT_COMM#. (This is a substitution variable that represents the value of that column. We're using that to set the WIDTH attribute of the bar).
    <li>Apply your changes and re-run the report.
    </ol>
    et. Voi la! You have a graph in your report.
    Hope that was clear enough.
    Doug

  • Auto Create TOC

    I'm using Adobe RoboHelp 9.0.2.271. I'm using the Auto Create TOC feature but my table of contents is created in the manner the topics were added to the system, not alphabetically. According to "help", when I use this feature, it should be created according to the chapter layout defined in the Project Manager (copy / paste below from help).
    Automatically create a table of contents based on the chapter layout defined in the Project Manager pod. If you automatically create a table of contents, books and pages are sorted alphabetically.
    I have the A-->Z button selected in the Project Manager pod, and when I view the topics there, they are in alphabetical order but the TOC is not created in that manner.
    Any ideas?

    See Item 28 at http://www.grainge.org/pages/snippets/snippets.htm#miscellaneous
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Adding section to active page

    Hi
    I´m trying to create a very simple javascript for adding new section to active page. So far I have made following code:
    var myDoc = app.activeDocument;
    var numero = app.activeWindow.activePage.name;
    var numero2 = numero -1;
    myDoc.sections.add(myDoc.pages[numero2]);
    It basically works as it should, whren I double-click some page thumbnail in pages panel, that page will become active... and if I run the script at that point it usually adds section to active page pretty nicely....
    However, if I use that script with Configurator 2.0 and create a custom panel, with Add a section button (where I have attached that same javascript) InDesign starts to throw me some weird alert:
    If I answer yes, script will work as it should, but I would like to make it work so that users won´t get that alert at all....
    If I run that scrpt from Scripts panel, it works without alerts...
    Another thing I have tried to figure out is how to create some kind of error handler that would stop the script if active page already has a section start, now script generates a javascript error in those cases.... it would be more classy if simply nothing happened....
    Any help appreciated.... thanks

    Thanks guys...=) but no luck here....
    And I noticed something quite weird. This script is meant to use with single pages, but when I accidentally used it with facing pages spreads, I got that same alert + script changed the way page numbers are marked below thumbs:
    It replaced 10-11 with 10,11
    I also tried
    try {
    var myDoc = app.documents[0];
    var numero = app.documents[0].layoutWindows[0].activePage.name;
    var numero2 = numero -1;
    myDoc.sections.add(myDoc.pages[numero2]);
    } catch (e)
    {  $.writeln("Error "+e.message+" at line "+e.line);}
    But I still have that same alert.... When I run that code in Extend Script ToolKit, I got following javascrip console message:
    Error undefined is not an object at line 2
    Result: undefined

  • I have these black boxes around my active pages, but I have voice-over disabled, any help?

    I have these black boxes around my active pages, I looked online for pointers but they all pointed to me disabling my voice-over in the universal access option on system preferences. My voice-over wasn't enabled and the boxes are still here, any help?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • TOC on a page

    I wonder if there is way of creating a TOC on a page.
    Would be great to just insert a TOC on one page listing all names of Sections, does anyone have any idea on how this could be done with automatically putting in the sections in the correct sequence?

    There could be a problem with the page itself. Let's try this first;
    *1
    Load the web page. (While you are at it, please post the link)
    After the page is loaded, hold down the <Shift> and reload the page.
    Does this help?
    *2
    '''[https://support.mozilla.org/kb/Clear+Recent+History#w_how-do-i-remove-a-single-website-from-my-history Remove History For One Site]'''
    Open the History Manager '''<Control><Shift> H.'''
    In the search bar, enter the name of the site.
    Right click on one of the listings and select '''Forget About This Site.'''
    This should remove all information, including any password.
    Then try again. Let us know how you are doing.

  • Create a custom Master Page in SharePoint Foundation 2013

    Hi,
    I am new to SharePoint foundation.
    I am trying to create a custom master page and save it as template, so that i can use it for all other sub sites. But i don't know where to start. Also i tries searching in Google, i got results for share point and not for share point foundation.
    So, Please give me a step by step procedure or a link to step by step procedure on how to create a master page, save it as template and use it for a sub site.
    Thanks in advance,
    Gowtham R

    Few points to note related to SharePoint Master page:
    You don't need to create master page template. If you deploy your master page in site collection level you can reuse the same master page in subsites without copying again and again, rather just by referencing
    You have not mentioned how you are going to deploy your master page. If you have any Visual Studio (VS) solution already, try to add your  master page in the VS solution and deploy your master page (and other branding components) as SharePoint WSP
    solution.
    Deploying master page will not activate the master page, you need to use some kind of 'Web Level Feature' to activate your branding - the feature will basically set the master page property of SharePoint site to your custom master page.
    Please follow the links below for steps by steps instructions (and you will find many just by googling 'sharepoint master page visual studio'):
    http://frederik.se/how-to-deploy-a-custom-master-page-in-sharepoint-2013-using-visual-studio/
    http://joshuaorimogunje.wordpress.com/2011/10/05/how-to-create-custom-master-page-for-sharepoint-2010-using-visual-studio-2010/
    http://blogs.msdn.com/b/bobgerman/archive/2011/01/31/packaging-master-pages-and-page-layouts-with-visual-studio-2010.aspx
    http://go.limeleap.com/community/bid/291931/Creating-a-Custom-SharePoint-Master-Page-with-jQuery-Using-Visual-Studio
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • I created a newsletter using pages on my IPAD3.  I can see see it...the icon is till there but when I tap it to open it, I get kicked out of pages.   Tried rebooting  and I can open other documents, but not this one.  Any ideas?

    I created a newsletter using pages on my IPAD 3.  All of a sudden I can no longer open that document.   When I click on it, it throws me out of pages all together.  I can open other pages documents, but not that one.  It is very frustrating to be able to SEE the file, but not open it.
    I rebooted and I do have icloud back-up on but am not sure how to restore an older version.  I also made sure there are no updates for pages.   Until the IPAD I used a home PC which I still have but am trying to wean myself off of.  I wish now I had used MS Publisher on my PC for the newsletter even though I hate it.   
    Please don't tell me I have lost my Newsletter and 20 hours worth of work.  

    Try resetting your iPad.  Hold the on/off and home buttons together for 7 or 8 seconds till the Apple logo appears.
    I'm assuming your default is to save Pages documents to iCloud, and that you had a good WiFi connection when you closed Pages the last time you tried to save the document.

  • HT204053 I have a problem. I bought Pages and Numbers for my iMac and so far everything was OK.  Suddenly i have a problem with connection to iCloud. Dokuments created on iMac in Pages or Numbers are not transfered to iCloud. Not uploaded in iCloud.

    I have a problem.
    I bought Pages and Numbers for my iMac and so far everything was OK.
    Suddenly i have a problem with connection to iCloud.
    Dokuments created on iMac in Pages or Numbers are not transfered to iCloud. Not uploaded to iCloud. There is a sign  (small shape of iCloud), that they are waiting to be uploaded to iCloud.
    I think the iCloud is OK.
    i can see and manage documents in iCloud. i can create them on iPad and  see them and delete them in iCloud.
    But not on iMac.
    i dont know what has happened and I am not abble to find the solution. It was OK till some days ago….

    I have a similar problem! Everything stopped working after upgrading to Mac OS 10.8.4 through the App Store. Help!

  • Create a follow up page in scripts using Duplex and Tumble Duplex in print

    How to create a follow up page in scripts using Duplex and Tumble Duplex in print mode of scripts ?

    it depends upon output device types.
    Regards
    Prabhu

Maybe you are looking for

  • Nilvce dll on 64 bit OS ?? (in english)

    The same message in english. Hi, I develop, under LabVIEW, two applications in two different projects. I build the executable of each application in his respective project. This two executables share data via shared variables in "single process" on "

  • Comm channels between edi siebel subsystems to sap r/3

    hi how to establish communication channels between siebel EDI SUBSYSTEMS TO SAP R/3 AND SAP BW systems how to integrate SAP system with people soft

  • Cannot join domain "the network path was not found"

    Hi there. As I wanted to install new Microsoft  Lync Server, I tried to prepare a virtual machine for this. For some reason I used a virtual machine that I tested for some another services, therefore it had some changes on it. As you know before inst

  • Special Characters in a username cause login problem

    We have got SSO setup on our application and have successfully been testing away, until we tried logging in with an account which has a '+' character in the username. We are authenticating and getting an SSO token but the login process then fails wit

  • Which card do you think is the best for my system .... (new in this area)

    Hi Friends, i  am learning the SC5 Premiere and i want to buy a card for my system: (my old one, 4870, not support Cuda) Intel Core 2 Quad Q9400 DFI LP UT X48-T3RS MainBoard ATI Radeon 4870 HD (i want to replace it, no Cuda) 2 Disk 1TB Sata 8GB DDR3