Linking text frames with script label array in vbs

Here's what I'm using
TextFrameStr = "name1,name2,name3,name4"
TextFrameArray = split(TextFrameStr, ",")
'On Error Resume Next
For i = 0 to Ubound(TextFrameArray)
myDocument.TextFrames.item(TextFrameArray(i)).nextTextFrame = myDocument.TextFrames.item(TextFrameArray(i + 1))
Next
I keep getting the the 'Requested member does not exist' message.
itemByName seems to not work as well.
Its probably someting quite silly!
Thanks for help inadvance

Still not working unfortunately. I have added the names into the layers palatte.
The code below produces
"Object doesn't support this property or method"
Set myInDesignServer = CreateObject("InDesignServer.Application.CS5")
Set myDocument = myInDesignServer.Open("C:\test.indd")
TextFrameStr = "name1,name2,name3,name4"
TextFrameArray = split(TextFrameStr, ",")
'On Error Resume Next
For i = 0 to Ubound(TextFrameArray) - 1
myDocument.pageItems.itemByName(TextFrameArray(i)).nextTextFrame = myDocument.pageItems.itemByName(TextFrameArray(i + 1))
Next
myDocument.Save "C:\test.indd"
myDocument.Close
many thanks in adavnce for any help

Similar Messages

  • Find a text frame on the page with script label

    hello to all
    I need to create a script to
    find a text frame on the page with script label "xxx"
    and read its contents into a variable.
    The content of the text frame is a number.
    thanks

    Hi Roberto,
    Welcome to the forum,
    This will find the labeled textFrame on the active page.
    var myLabel = "Foo", // change to label
          myPage = app.properties.activeWindow && app.activeWindow.activePage,
          myTextFrames = myPage.textFrames.everyItem().getElements().slice(0),
          l = myTextFrames.length,
          myVariable
    while (l--) {
        if (myTextFrames[l].label != myLabel) continue;
        myVariable = myTextFrames[l].contents;
        break; // presuming there's only one "Foo" labeled frame on the page
        // Otherwise you'll nead an array
    alert(myVariable)
    Trevor

  • How to link text frames in Pages 5.2?

    How to link text frames in Pages 5.2?

    The correct term in Pages is Text Boxes, and true linking is not implemented in v5.2. You can Unite, Intersect, Subtract, and Exclude multiple Text Boxes via the Arrange panel. These attributes only appear when two or more Text Boxes are selected. Also, on the Arrange menu, you will need Object Placement set to Move with Text, and the Text Wrap set to None for more accurate positioning.
    In the following example, there was initially a Text Box with overflowing text that was duplicated. With both Text Boxes selected and aligned, I could then use the Unite feature from the Arrange panel. This allowed the text to flow into the second box. Selecting text in one box and dragging upwards continues the text selection between both boxes. Hoefler italic applied in one box is applied to both. Appropriately placed, another trip to the Arrange panel to enable Text Wrap around and text fit adjustments.

  • How to determine column inches in a text frame with intersecting frames?

    I am trying to write a script to determine how much text would fit in a text frame before actually having the text. If the frame has no run-around areas intruding on the frame it is the simple depth of the frame. Is there an easy way to determine the area of the frame with the obstructed areas subtracted?

    Maybe you could fill text frame with placeholder text:
    myTextFrame.contents = TextFrameContents.placeholderText;
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/

  • Select all Linked Text Frames

    Dear All,
    My Request:
    1. Is it possible to select all linked text frames of my selecting text frame (Please refer attachment)
    2. Suppose If we select all text frames, is it possible to fix height for all text frames like as 3p or 4p etc....
    Trying script for select all linked text frames:
    if (app.selection[0].nextTextFrame == null)
       if (app.selection[0].previousTextFrame != null)
            alert("pass")
            app.select(previousTextFrame.parent) && app.select(nextTextFrame.parent) && app.select(startTextFrame.parent)
    Could you anyone give solution for my request.
    Thanks in advance
    Beginner

    Hi All,
    If I select any text frame, I need to select all linked text frames of selecting text frame.
    Please can anyone help me...
    Please refer the above screenshot for your reference.
    Trying script:
    if (app.selection[0].nextTextFrame == null)
       if (app.selection[0].previousTextFrame != null)
          myParagraphs = app.selection[0].parentStory.paragraphs;
          for (j=0;j<myParagraphs.length;j++)
            myParentTF = myParagraphs[j].parentTextFrames[0].contents
            alert(myParentTF)
    Output i needed:
    Thanks in advance
    BEGINNER

  • Selection text frame in linked text frame remove

    I chose in the text frame the linked text frames
    get out of text and I want to delete a text frame
    Is it possible that a command letter
    same thing selecting the external can

    Ok. Try now,
    var doc = app.activeDocument;  
    app.findGrepPreferences = app.changeGrepPreferences = null;  
    app.findGrepPreferences.findWhat = "~a";  
    var found = app.selection[0].findGrep();  
    for(var i =found.length-1;i>=0;i--)  
            var ip = found[i].insertionPoints[0];  
            if(found[i].allPageItems[0] instanceof TextFrame) 
                    var cont = found[i].allPageItems[0].texts[0].duplicate(LocationOptions.AFTER,ip);  
                    found[i].remove();  
    Regards,
    Chinna

  • Lining up text in linking text frames

    I've inherited a document design from an agency that my client sometimes uses - the client can't get their hands on the original files so I've recreated from a PDF.  I can't replicate how they make text line up across a page through linking text frames.
    The majority of their text frames have VertJustification set to Bottom, so I'm setting that as Default for my text frames.  But when I put dummy text in to my frames, I get very bad alignment of lines - especially at the top - when there is a different number of paras in each frame.
    Design agency PDF http://dl.dropbox.com/u/4460087/designagencytext.png
    My InDesign setup http://dl.dropbox.com/u/4460087/mytextsetup.png
    Current text
    9pt text
    14pt leading
    2mm (5.9pt) space after each para
    Given their text set up - especially the 2mm space after each para - they must be doing some adjustment and balancing after the text is added.  I'm just not sure how.
    Any clues??

    Assumption simply based on the fact that they seem to line up more often at the bottom through 80 pages of this stuff rather than at the top.
    But I think you've hit the nail on the head for me.  Setting my frames VertJust to 'Justify' helps me do replicate their style quite easily.
    And agreed, I also think the visual distraction of lines not lining up across columns is worse than having columns line up at the bottom.
    Thanks for the help.

  • To group images with created text frame and apply label for it...

    Hi Everyone,
    We are currently working in auto figure placements for CS3. I have placing the figures into the document. Then i am creating figure caption text frames below the images. Here the concern is i need to group these image and the text box. After this i have to place these images with captions into corresponding pages where the figures have been cited. Also suggest me how to place these images in center of the page as well as in top or bottom of the page margin.
    Can anyone help me for this. Your help will be much appreciated.
    Below is my modified script,
    var myPage;
    main();
    function main(){
        var myFilteredFiles;
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"]
        var myFolder = Folder.selectDialog("Select the folder containing the images", "");
        if(myFolder != null){
                if(File.fs == "Macintosh"){
                    myFilteredFiles = myMacOSFileFilter(myFolder);
                else{
                    myFilteredFiles = myWinOSFileFilter(myFolder);
                if(myFilteredFiles.length != 0){
                    for (j=0; j<myFilteredFiles.length; j++){
                        var myImages = myFilteredFiles[j];
                        citePage(j);
                        app.activeDocument.pages.item(myPage.name).place(myImages);
                        alert("Done!");
    function myMacOSFileFilter(myFolder){
        var myFilteredFiles = myFolder.getFiles(myFileFilter);
        return myFilteredFiles;
    function myFileFilter(myFile){
        var myFileType = myFile.type;
        switch (myFileType){
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++){
                var myExtension = myExtensions[myCounter];    
                if(myFile.name.indexOf(myExtension)>-1){
                    return true;
                    break;           
        return false;   
    //To find cited pages
    function citePage(myInst){
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
        app.findGrepPreferences.findWhat="(?<=Figure \\d\\.)\\d";
        var myFind=app.findGrep(false);
        myPage = myFind[myInst].characters.item(0).parentTextFrames[0].parent;
        return myPage.name;
    Thanks Regards
    Thiyagu

    The shadow effect has to have something to be applied on, but by default text frames borders and fills are invisible.
    If you set the border of your frame to a color & thickness, you'll see it gets a shadow of its own, independent of the text. (Try it with dotted and dashed lines!)
    Additionally, if you set the fill of your text frame to a solid color, you'll see the single solid shadow you were expecting.

  • How to set italic to a text frame with a JS script

    Hello guys,
    I'm a java developper, and for my customer I have to generate some JS scripts for Illustrator CS3/Windows XP.
    In my use case, I need to layout several textframes. Some need to be "bolded", some others have to be underlined, and some need to be italic.
    I found how to set the bold and underline attributes, but for the italic, I can't see any option related to it. I saw the "CharacterAttributes#italics" property, but the description is a bit odd: "If true, the Japanese OpenType
    font supports italics."... it doesn't fit my needs...
    Is it possible to make a text italic with a JS script in Illustrator?

    You will have to use the proper italic form of the font. AI does not support Faux italic or bold.

  • How can I do a multiple record data merge, but specify that a specific text frame with variable data only merges on the first record?

    I'm doing a multiple record data merge, I have 2 frames both with variable data placed inside.
    I would like to specify that one of the text frames only merges once(first record) and the other frame multiple times for each record in the data file.
    Is it possible?
    I thought that perhaps if I place the text frame that must merge once on the master page, it would work.  But you are not allowed to place variable text on the master and on the document page.
    I'm going to try it through scripting next, but thought that perhaps there is an easier way that I'm not aware of.
    Thanks,
    Suzanne

    Suzanne,
    If you were trying to post a screen shot, you would need to return to the forum and post it using the "camera" icon at the top of the post editing windows.
    I use a plug-in from Em Software called InData. One of the benefits for what I do is there are no individual frames on a page to deal with post-merge. Individual frames are great for simple merges (address labels, post cards, etc.). But I typically do more other types of merges.
    That said, there is a drawback--one needs to come to an understanding of writing expressions that actually parse the incoming data. So in the spice price list example, that looks like:
    It's reasonably easy once one does it a few times. And it can be far more complicated. The above is from Em Software's samples that has been tweaked. The best thing I can recommend would be to download the trial and see for yourself. They are good at responding to specific questions if you get stumped.
    I imagine this all could be scripted somehow in ID. But I have no idea how and the plug-in just lets me keep working.
    Mike

  • How can I simply create a text frame with perfect rounded ends?

    I'm recreating a new edition of a book that was originally created in Quark. It uses round-ended text frames. When using the simplest method of corner options, the ends aren't proper semicircles, even though the radius is set to half the height of the frame.
    The other problem is that I can't reduce the width sufficiently to make it look balanced. I use the direct selection tool to close in the right-hand end, so that I don't distort the shape. There's no right indent for the paragraph, but as I reduce the width the text breaks into two lines, even though I've greater space after the text than the left indent. My best solution was to create the shape in Illustrator and copy and paste into InDesign, assign text content, centre thte text vertically, use 3mm left indent. I still couldn't pull the right-hand end in tight enough. So I had to resort to making a group of the lozenge shape with a normal rectangular text frame on top.
    Does anyone know why these problems occur, and can Adobe improve the corner option?

    One last refinement: It's convenient if the script allows you to Undo/Redo its actions -- let me add that for completeness' sake. The following is the complete script again, no further editing required.
    //DESCRIPTION:Overlay round corners on a single textframe
    // A Jongware Script 2-Apr-2012
    app.doScript(function(textframe){
    if (textframe instanceof Group && textframe.pageItems.length == 2)
    roundedRect = app.selection[0].polygons[0];
    textframe = app.selection[0].textFrames[0];
    textframe.properties = {strokeWeight:roundedRect.strokeWeight,strokeTint:roundedRect.strokeTint,strokeColor:roundedRect.strokeColor};
    roundedRect.remove();
    app.selection[0].ungroup();
    left = textframe.geometricBounds[1];
    right = textframe.geometricBounds[3];
    height = textframe.geometricBounds[2] - textframe.geometricBounds[0];
    center = (textframe.geometricBounds[2] + textframe.geometricBounds[0])/2;
    radius = height/2;
    leftRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,left-radius,center+radius,left+radius]});
    riteRounded = textframe.parent.ovals.add({geometricBounds:[center-radius,right-radius,center+radius,right+radius]});
    rectBetween = textframe.parent.rectangles.add({geometricBounds:[center-radius,left,center+radius,right]});
    roundedRect = rectBetween.addPath([leftRounded,riteRounded]);
    roundedRect.properties = {strokeWeight:textframe.strokeWeight,strokeTint:textframe.strokeTint,strokeColor:textframe.strokeColor};
    textframe.properties = {strokeWeight:0};
    app.select(textframe.parent.groups.add([roundedRect,textframe]));
    }, ScriptLanguage.JAVASCRIPT, app.selection[0], UndoModes.ENTIRE_SCRIPT, "Overlay Round Corners");

  • Linked text frame in enumeration

    in one document there are many embedded text frame (object style applied = "myObjSty1")
    I want to write increasing numbers
    I tried to write but did not
    Can you help me in this regard
    Thank you in advance
    var sNo = 1;
    var doc = app.activeDocument; 
    app.findGrepPreferences = app.changeGrepPreferences = null; 
    app.findGrepPreferences.findWhat = "~a"; 
    var found = doc.findGrep(); 
    for(var i =found.length-1;i>=0;i--)
    if(found[i].allPageItems[0].appliedObjectStyle == myObjSty1)
         found[i].texts[0].select();
         app.changeGrepPreferences.changeTo = (++sNo);
         app.selection[0].changeGrep();

    Hi Guys,
    although this seems to be answered a idea for a nonscripting way:
    1. Create a paragraph style with autonumbering in a separate textframe with Autosize > width only.
    2. Insert your textframe with the numbers
    3. Write your text, add or delete some numbers, half way done
    4. You will maybe discover a problem, that is shown in my screenshot. Sometimes the textframes and the followed character are overlapping. I think this is a bug.
    5. Solution: Create a shortcut for "Recompose all stories immediately". After refreshing the document everything is fine, so no script needed
    –Kai

  • How to create a 'clone' linked text frame

    I have a large document, and the page numbering is not in a straight manner, as there are blank pages, which must be ignored for numbering. The blank pages are needed to make it easier for the printer, some pages need to be one-sided, others need to be two-sided.
    The numbering of the pages need to be done manually, or else I have to assign every page a section start, and for printing purposes this is kind of risky (page 1 is not really page 1 for instance...)
    OK, so far so good, I also need to create a table of contents, and check the document, and I was wondering if I could create a larger 'copy' of my manual page number, next to the page. At the moment I need to zoom in or select the frame and use apple-y to check the number.
    I create a slug area, I would like to put a larger textframe with the number in a larger corps in it, but it needs to 'link' to the original smaller text. Is this something that could be done by a utility or another way? It is not something I have to do every day, but I was just wondering if a kind of active 'clone' was possible. The 'copy' needs to be actively linked to the other textframe, every change must be implemented, but on a document page, not through a master page.
    Or else a page numbering scheme like 1,3,5,7 of 'ignore blank pages' would be appreciated

    That's a really bizarre way to number pages. Make sure you specify this to the printers, as a note to them. It's just not a normal way to number pages and printers would appreciate a heads up on it.
    There is no way to automate it as such. It would have to be manually updated when pages are added or moved around.
    You will still need two Master Pages
    Create an empty text frame on the Master Page on both spreads, make sure they are linked.
    Create a text file with sequential numbering from 1 - whatever the final page number is.  (excel can do this quite easily).
    Place the text file into the Main Pages at the starting page.
    You will then need to apply the Master Page without that text frame to every page that does not need a page number.
    You can do this easily by holding down Control (might be CMD on Mac) and then selecting the pages that don't require page numbers - then use the Apply Master Pages and select the master page to apply to those pages.

  • How to insert, merge linked text frames into existing long linked frame story?

    I have a book with a single story, many linked frames/pages. The index takes 4 pages in the last part of the book, but not the final pages. I have regenerated the index and it is 4 pages of linked frames in a separate story in extra pages I generated at the end of the book. I selected the new index pages from the pages panel and moved them to the proper location in the book. I want to delete the old index & pages, but that still leaves me with two stories with the main story frames jumping around the index story frames. I want the index to be part of the main story so that if the text expands the index will move.
    In short, insert and merge a story and its associated text frames in the middle of another story.
    My move pages approach got it in the right location, but it will not float if the page count changes.
    The only way I can see to do this is go back to my new index, select it all in the story editor, copy it, go to story editor on the original story, and paste in the proper location. This works, but it seems as if there should be a way of also doing it with frames, in ports, out ports, etc.

    I must be unclear on the concept. I moved my new index into the existing story between the two desired pages. This shows the original story on the left with the text threads going around the inserted Index story:
    Now I click the outport of the text frame on the left and alt click into the Index frame. That overwrites the contents of Index.
    Not what I want. I actually want to split the text as well, and just thread thru the index frames and then continue with the original story. I did the above as a test case. For my actual problem, copying the index story in story mode, and pasting it over the appropriate text in the original story solved my problem.

  • Two separate text frames with own toc

    How do I set up two separate text frames side-by-side as two columns, and create a separate table of contents for each?
    I need to create a two-language document with English on the left and a translated language on the right. Each language will also have separate illustrations and cross references to them in the text. Basically, I need to create two manuals in a single document.
    I'm doing this with Frame 7.1 if that makes any difference.
    Thanks in advance for any suggestions.

    To create the two separate text frames, simply use the Text Frame graphic tool on the Master Pages to draw tthe second frame. You will need to give the "Flow"  for this text frame a unique name. By default FM uses "A" for a flow name, but you can change this to be the name of the language.
    See: http://help.adobe.com/en_US/framemaker/using/WSd817046a44e105e21e63e3d11ab7f74e4d-7fb8.htm l (Set up a multi-flow document)
    However, I would recommend that you first create separate documents for the English and translated versions. Then import the contents of those documents by reference (i.e. create text insets) in your combined document.
    Use the combined document as your publishing vessel and the separate documents as your editing/working environment.
    The only gotcha would be if you need to maintain side-by-side fidelity with each paragraph in the English and translated version. If so, then you should import by copy and then you'll hjave to manually adjust the paragraph spacings to stay lined up.

Maybe you are looking for

  • Link discoverer  reports  with E-businees Suite  R12

    Can anyone help me with this statement 3.3.3 Parameters : mode=DISCO&workbook=<workbook identifier from step2>&parameters=Disco parameter name M~Parameter M Value* what am i suppose to put in "parameter name " is it the worksheet name?

  • Putting more than 1 movie into iDVD

    This may seem a stupid question but I have made one movie with English subtitles in it for my company, what I would like to do now is copy the original iMovie and insert say German and French subtitles so I would end up with maybe 3 or 4 iMovies (eac

  • Adobe acrobat x pro - pdfmaker for Outlook 2010

    Using windows 7 pro 64 bit Microsoft office 32 bit I bought adobe acrobat x pro today thinking that would finally allow me again to use pdfmaker to back up folders I don't see this feature at all available in Outlook.

  • Errors with 7.4

    After installing the new 7.4 Itunes and then stating it. I get "Itunes could not connect to the Iteuns Store. An unknown Error occurred (1133). Make sure your network is connections is active and try again", but when I click on the store it goes ther

  • Different results of same calculation between SQL and PL/SQL

    This SQL statement: select 1074 * (4 / 48) from dual;Gives the result 89.5. However this PL/SQL block declare     tmp     NUMBER; begin     SELECT 1074 * (4 / 48) into tmp from dual;     dbms_output.put_line('Result '||tmp); end;Gives a different res