VB Script for CS5

I am looking for help to update a VB script from InDesign CS2 to InDesign CS5. I have hit a snag with placing a graphic in a named or labeled Frame or box. It has been a few years since I have done much scripting so I am out of the loop of new things.
If I select the graphic box the script will place the graphic.The line that is commented out.
But when I try to place it using the label name it fails with error The requested member of the collection does not exist with code 800A7708
Here is a little of the code where I am having trouble.
Set fso = CreateObject("Scripting.FileSystemObject")
Set wshShell = WScript.CreateObject ("WScript.Shell")
Set myInDesign = CreateObject("InDesign.Application.CS5")
myInDesign.activate
set myDocument = myInDesign.Documents(1)
Set myPage = myDocument.Pages.Item(1)
''set MyRectangle = myDocument.Selection.Item(1)
set MyRectangle = myDocument.Pageitems.item("A1")
MyRectangle.Place "I:\5_EVOReady\3940249.pdf"
This code does work properly in Indesign CS2
Any thoughts or suggestions will be appreciated .

@rjbull – yes, "something has changed". Since InDesign CS5 you cannot adress the label like that anymore. There is a new property, name, and with item("A1") or itemByName("A1") you'll address the first found pageitem with that particular name in the pageitem collection.
I'm talking ExtendScript here, not VB Script, but it should be quite the same. Syntax is a bit different, but the basics are the same.
Unfortunately there is no itemByLabel() method or function. So you have to loop through all the pageitems searching for a pageitem with the label of value "A1".
See the following posts about that problem and some more issues:
Harbs
With CS5, some things have changed
Oct 3, 2010 1:50 AM
With CS5, some things have changed
Uwe

Similar Messages

  • Is there a script for CS5 to export a multi-page InDesign Document to single page InDesign documents

    Hello,
    I am having trouble finding a script or utility that would allow me to export each page of an InDesign CS5 document as multiple single page InDesign documents. I have found one script that does this for CS3, but nothing for CS5. Thank you for any help.

    Generally speaking, if a script doesn't run in a later version, you can put it in a subfolder withteh correct version number as the name and it will work. For CS3 that would be "Version 5.0 Scripts" without the quotes.
    That said, if you have Acrobat pro, it's probably easier to use the extract pages command...

  • Need Edwardian Script for CS5- anyone know where I can get it?

    I have a client that wants Edwardian Script for her wedding video. I don't have it on any of my Adobe CS5 products. I do not want to join the cloud. Anyone know how I can get the font and use it with CS5?

    I saved the font to my C drive, and then re- launched PP.
    Saving the font will not show up in PP. You need to "install" the font into your "Fonts" directory. Did you install it or just save it? If you did not install it you should just be able to right click on the font and select to install it from the contextual menu. Once the font has been "installed" in your Fonts directory all of the apps will read it. I have Edwardian Script installed on my machines and the Adobe apps read them fine.

  • Need help with a decimal align tab script for CS5

    I have a list that consists of 6 tabbed headers in helvetica bold, followed by a list of numbers that should right align under the headers, and these need to be in helvetica regular. The list is currently in arial font. Is it possible to change both the fonts and set the tabs to align right by using a script? If so, is there one 'out there' somewhere? I am desperate, this is for my daughter's basketball team and they need it asap!
    I am working in indesign cs5 and know how to load and run a script.
    Please HELP!
    Thank you
    Heather

    Hi,
    For some reason I can not download any attached documents from the forums, a bug?
    But anyway, send me an e-mail at "mail (curlya) nobrainer.dk" with the example doc, and i will have a look - no promisses :-)
    Thomas B. Nielsen
    http://www.nobrainer.dk

  • Document setup bleed script for CS5?

    New to scripting, but trying to figure out how to automate document bleed settings with AppleScript. Is this even possible, and any suggestions?

    I don't have CS5 but I do still do the odd bit of AppleScript… Still Im not sure what you mean here can you either explain in more detail or post an image of what it is you are trying to do?

  • How can I start scripting in CS5 for Windows?

    I have just installed CS5. I tried running a script I had adapted from CS4, and it would not run. Then I discovered there were major changes for CS5, and tried running the sample script FindChangeByList on a short piece of text, but it appeared not to start: the cursor remained flashing as it normally does when in text. Should I try reinstalling or is there a less drastic option?

    Hi Michael,
    I think, then, that the problem is one of permissions. What I've done on Windows 7 installations is to go to the InDesign application folder (in program files), select the InDesign.exe file, use the Context menu (right-click) to display the Properties panel, and then turn on the Run This Program as an Administrator option in the Privelege Level section of the Compatibility tab. Click the Change Settings for All Users button to apply the change (assuming that your current user profile is an Administrator).
    Let me know if that helps!
    Thanks,
    Ole

  • Ann: Script Panel replacement for CS5

    I've been working on a fun project the last few weeks in the new Extension Builder for CS5.
    Here's what I came up with (I think it's very cool!) :
    http://in-tools.com/wordpress/script-bay/script-panel-replacement-for-the-entire-creative- suite
    Harbs

    I don't think Adobe pays very much for this stuff, unfortunately...
    I'm gonna have some more fun with it yet. Stay tuned...
    Harbs

  • I have Photoshop CS5. I downloaded the script for contact sheets. It didn't work. How do I do it?

    I have Photoshop CS5. I downloaded the script for contact sheets. It doesn't work. How do I do it?

    Adobe - Photoshop : For Windows : Photoshop CS5 Optional Plugins
    Adobe - Photoshop : For Macintosh : Photoshop CS5 Optional Plug-Ins (Mac)
    Optional Automate Plug-ins:
    NOTE: We strongly encourage the use of the CS5 Optional Automate Plug-Ins Installer over attempting to manually install any of the following Optional Automate Plug-ins:
    • Contact Sheet II
    • Picture Package (ContactSheetII)
    • Web Photo Gallery (WebContactSheetII) plus presets
    • Script for Layer Comps to Web Photo Gallery
    INSTALLATION INSTRUCTIONS
    Refer to the included ReadMe file that has plug-in descriptions and installation instructions.
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Note these also work in the perpetual CS6 Windows version not the Subscription CS6 version.  Some may work on the Mac however Picture Package(Contact sheet II) will not work on the MAC for Mac CS6 is 64Bit only and there was only a 32Bit plug-in for Mac CS6.  There are 32bit and 64bit versions for windows. I install these manually....

  • Is there a script for renaming layers in ID CS5?

    Hello,
    I am new to scripting (I just started today) so far I have found some very useful existing scripts to help automate my workflow. I am wondering if anyone knows of the existence of a layer renaming script for InDesign.
    I have seen similar scripts for PS. I want to learn how to script but I am in need of this one for Monday...
    Thanks in advance!

    Antonio:
      Please remember that we're all volunteers here. If you can ask your question so we can understand it, we can probably help you. But if you cannot, it would take quite a lot of effort on our part to even determine what you asking.
    Jongware wrote in the other thread:
    This is quite a specialized case so it's unlikely there "is" a script. But there "could be" one. Ask in the scripting forum, as there are some people in there sharpening their skills with such requests. Make sure to detail what you need it to do: which layers? rename to what? Et cetera.
    You're not doing a good job on detail. How would the script know what to change your first, 3rd, 4th, and 5th "atoms" to?
    You have given us no information that I can see.

  • Scripting in CS5

    Looking for information for someone else, I came across a post here that said "use the script ExportAllStories.jsx that comes with your default InDesign installation." Went to my CS5 installation, inherited from my predecessor … no Scripts option anywhere. My Illustrator CS5 from the same installation has File > Scripts; even my FrameMaker, on the remotest fringes of the Adobe family, has File > Script. What do I have to do to access scripting for InDesign?

    Thanks, Peter! Ah, there's nothing like with an integrated UI across products … and this is nothing like an integrated UI :-}
    PhotoShop CS5 also has its scripts under File, so did someone take a conscious decision to put scripts at a different level and in a different menu in IDD?

  • Reworking Photoshop layer renaming script for Illustrator

    The Photoshop scripting guru Paul R over at RetouchPro has created a really cool script to batch rename and number selected Photoshop layers. I haven't found anything similar on the Illustrator side.
    He's given permission for me to post it here in my hopes that some Illustrator scripting genius could come up with a similar script for Illustrator. Would it be terribly difficult to convert this into something Illustrator could use?
    http://www.mediafire.com/file/g7usr73u0236p0a/Rename_&_Renumber_Selected_Layers.jsx
    http://www.mediafire.com/file/dbah74x13bsa74c/Rename_&_Renumber_Selected_Layers.jsx.zip

    Hola Julio, I updated the script to rename visible Layers or Sublayers, and also fixed the Color
    #target illustrator
    main();
    function main(){
        if(!documents.length) return;
        //var allLayers = app.activeDocument.layers;
        var win = new Window( 'dialog', '' );
        g = win.graphics;
        //  var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]); // CS5
        var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.50, 0.50, 0.50, 1]); // CS6
        g.backgroundColor = myBrush;
        win.orientation='stack';
        win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
        win.g1 = win.p1.add('group');
        win.g1.orientation = "row";
        win.title = win.g1.add('statictext',undefined,'Rename Visible Layers or Sublayers');
        win.title.alignment="fill";
        var g = win.title.graphics;
        g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
        win.g5 =win.p1.add('group');
        win.g5.orientation = "column";
        win.g5.alignChildren='left';
        win.g5.spacing=10;
        win.g5.st1 = win.g5.add('statictext',undefined,'New layer name');
        win.g5.et1 = win.g5.add('edittext');
        win.g5.et1.preferredSize=[250,20];
        win.g10 =win.p1.add('group');
        win.g10.orientation = "row";
        win.g10.alignment='fill';
        win.g10.spacing=10;
        win.g10.st1 = win.g10.add('statictext',undefined,'Serial Number');
        win.g10.et1 = win.g10.add('edittext',undefined,'1');
        win.g10.et1.preferredSize=[50,20];
        win.g10.et1.onChanging = function() {
          if (this.text.match(/[^\-\.\d]/)) {
            this.text = this.text.replace(/[^\-\.\d]/g, '');
        win.g10.st1 = win.g10.add('statictext',undefined,'Length');
        var nums=[2,3,4,5];
        win.g10.dl1 = win.g10.add('dropdownlist',undefined,nums);
        win.g10.dl1.selection=0;
        win.g15 =win.p1.add('group');
        win.g15.orientation = "row";
        win.g15.alignment='fill';
        win.g15.cb1 = win.g15.add('checkbox',undefined,'Reverse layer order');
        win.g15.cb2 = win.g15.add('checkbox',undefined,'Rename Sublayers Only');
        win.g100 =win.p1.add('group');
        win.g100.orientation = "row";
        win.g100.alignment='center';
        win.g100.spacing=10;
        win.g100.bu1 = win.g100.add('button',undefined,'Rename');
        win.g100.bu1.preferredSize=[120,30];
        win.g100.bu2 = win.g100.add('button',undefined,'Cancel');
        win.g100.bu2.preferredSize=[120,30];
        win.g100.bu1.onClick=function(){
            if(win.g5.et1.text == ''){
                alert("No layer name has been entered!");
                return;
            win.close(0);
            var sublayersOnly = win.g15.cb2.value;
            var visibleLayers = [];
            getVisibleLayers (app.activeDocument, visibleLayers, sublayersOnly);
            if(win.g15.cb1.value) visibleLayers.reverse();
            for(b=0; b<visibleLayers.length; b++){
                var LayerName = win.g5.et1.text + zeroPad((Number(win.g10.et1.text)+Number(b)), Number(win.g10.dl1.selection.text));
                visibleLayers[b].name = LayerName;
        win.center();
        win.show();
        function getVisibleLayers(container, visibleLayers, sublayersOnly) {
            for(var a=0; a<container.layers.length; a++){
                var ilayer = container.layers[a];
                if (ilayer.visible) {
                    if (sublayersOnly) {
                        getVisibleLayers (ilayer, visibleLayers, false); // false to process only 1 sublayer depth
                    else
                    visibleLayers.push(ilayer);
    function zeroPad(n, s) {
        n = n.toString();
        while (n.length < s) n = '0' + n;
        return n;

  • [AS] Versioning to preserve CS3 scripts in CS5

    Hi everyone,
    I've been reading through the thread about what has changed for scripting InDesign CS5. I have been writing scripts for CS3 for about a year and we are upgrading in the new year. I have the demo of CS5 loaded so I can test how the scripts i've written will or won't run.
    Someone indicated in that "what's different" thread that you can "version" the scripts so that they will run in newer versions without having to rewrite the parts of the syntax that have  changed.
    Can someone elaborate on how to do this with AppleScript?
    I put
    tell application "Adobe InDesign CS5"
    set version of script preferences to "5.0"
    at the beginning of the script (and changed all instances of CS3 to CS5 in the script as well) but the script is still not working as with CS3.
    Is there something else I need to do to get CS5 to recognize the syntax of CS3 and understand the commands?
    Thanks

    You will want to set the version back at the end of the script too.
    To deal with the syntax issues, you can wrap the relevant code in:
    using terms from application "Adobe InDesign CS3"
    end using terms from
    You can use the "publish terminology" command to make a dummy dictionary-only version of CS3 so you don't need both versions running; how to do it is documented in the InDesign CS5 Scripting Guide.
    For scripts you run from the Scripts panel, you don't need to make any changes -- just enclose them in a folder called "Version 5.0 Scripts".

  • Scripting for CC

    Is there any information out there about scripting for CC (preferably AS, if possible), or about the scripting differences between CS6 and CC? In the latter case, I would also be interested in the basic CS6 scripting information.
    Thanks!
    AB

    Yes indeed.
    In CS5, the use of footnotes causes some pages to become blank, that is to say the text frame on an affected page is emptied of text. This does not happen in CS6, so the bug has been adressed there, why not in CS5 also? In both CS5 and CS6, ID splits two-line footnotes even when the paragraph style forbids it, the solution requires repeated manual intervention and entails style overrides that complicate checks for illicit overrides.
    But for me the main problem with CS6 is that it crashes repeatedly under certain circumstances that I am unable to identify or avoid, perhaps connected with inline illustrations, perhaps with tables, perhaps with both. When a page-layout program crashes before being able to produce a PDF, it is not a great deal of use.
    In my view, Adobe has been engaged in a what they call, where I live, a "fuite en avant", a headlong dash nowhere, curing some bugs and replacing them with others in a hopeless attempt to make ID all things to all men. The more stuff they put into the program, the less reliable it becomes.
    The world certainly needs good electronic publications software, but in addition to, and not at the expense of, existing conventional page-layout programs.
    AB

  • There us to be a "script" for ticket numbering. What happened to it?

    In InDesign, there use to be an available "script" for ticket numbering. (Multi tickets on a page and several pages, that I could arrange to be cut in stacks and retain their order.) I use to use it in CS5 and CS6... but when I went to CC the script is gone. I think it was a third party "script". Please help. I need it soooooooo badly.

    Hi Peter,
    What you say is what you want !
    So, make a master page as :
    And launch this clever [JS] written by Jared Katz. Define your settings and "OK".
    Done! 
    page 1…
    … to last page!

  • Creating SQL-Loader script for more than one table at a time

    Hi,
    I am using OMWB 2.0.2.0.0 with Oracle 8.1.7 and Sybase 11.9.
    It looks like I can create SQL-Loader scripts for all the tables
    or for one table at a time. If I want to create SQL-Loader
    scripts for 5-6 tables, I have to either create script for all
    the tables and then delete the unwanted tables or create the
    scripts for one table at a time and then merge them.
    Is there a simple way to create migration scripts for more than
    one but not all tables at a time?
    Thanks,
    Prashant Rane

    No there is no multi-select for creating SQL-Loader scripts.
    You can either create them separately or create them all and
    then discard the one you do not need.

Maybe you are looking for

  • How to restore a corrupted file?

    Hello, I have a problem with the Illustrator file I was working on. I cannot open it, and the icon of the file is a bit opaque with a grey cross. If I try to move it, a message says that the file is unavailable. But still is not an empty file. This i

  • LabVIEW file browser can't see folders

    I am using LabVIEW 7.0 on Sparc Solaris 2.6.  I am using NFS to serve folders from a RHEL5 linux server.  These folders contain my LabVIEW code, and I am mounting them on my Sparc Solaris workstation.  When I open the LabVIEW file browser, some folde

  • What type of cable??

    My screen went out on my g3 and am trying to connect it to a computer monitor (VGA). Apple does not sell cables for the ibook g3 laptop any more. I ordered two cables (mini display port and mini-DVI) and they were either to small or too big for my co

  • Multiple Column return in OLEDB Command SSIS 2008

    Hi Can someone help me on this please? I think in case we want to capture return value from a stored proc in SSIS OLEDB Command, we usually write something as Exec ? = mystoredProc ?, ?, ?, ?  [assuming 4 input parameter and a return value], but I wa

  • On what parameters based an aggragate can be decided whether it is good agg

    Hi, On what parameters based an aggragate can be decided whether it is good aggr or bad aggr. Regards, Siva Thottemopudi