Indesign Script to import Library asset beneath all graphic frames

Hi all,
I wonder if anybody could help me with a problem? (I'm learning scripting but some things are still a bit tricky)
I have managed a script to place a Library Asset onto a page.
What I need however is a script to place multiple instances of this Library asset directly beneath every graphic frame that exists in my whole document. If it can be done, I preferably need the asset to snap to the bottom left of the frames, top of the asset touching the bottom of the graphic frame.
This is from Library 'Library' and the asset is 'Test'
Has anybody a script or something similar? Thank you.

AFAIK, you’re wasting your time. If you want those options you’ll need to use file>place. It is worth noting that many of those options are sticky so if you need the same option all the time just place one file and choose the appropriate options.

Similar Messages

  • InDesign CS3 Scripting XML Import Multiple Images into same Text Frame

    I am having trouble importing multiple images into the same Text Frame using XML import. I imported 5 images into the text frame. However, all 5 images are laying on top of one another. Does anyone know if there is a way to have all images laying out like how Microsoft Word handles inline images, i.e., laying out next image to the right of previsous image in the same line and if there is not enough space left in the line, then wrap to next line. Thanks in advance. I understand I could use JavaScript to do post import processing, e.g, calculate the image size and place each images accordingly. But I am trying to see whether there is a way to do this without scripts.

    You can apply an object style to all anchored images by script. A text frame containing main flow should be selected.
    var doc = app.activeDocument;
    var textFrame =  app.selection[0];
    var rectangles = textFrame.texts[0].rectangles;
    if (rectangles.length > 0) {
         for (var i=0; i < rectangles.length; i++) {
              rectangles[i].appliedObjectStyle = doc.objectStyles.item("Cover");
    However, there is a better approach:
    Step 1
    Create place holders for a single "Book" element and format it as needed -- apply an object style to the cover.
    Step 2
    Import the xml file -- the placeholders are replaced with data from the 1st xml element
    Step 3
    Drag & drop the element containing all "Books" elements into the main flow -- all elements are placed and formatted the same way as in step 1.
    Finally, add a new page, click the overset text icon and autoflow text to add pages so that to fit all the text.
    Hope this helps.
    Kasyan

  • Exporting library assets to frame 1 causes delay

    I'm fairly new to Actionscript 3, just trying to puzzle something out.
    I have several small movie clips saved in the library of myCS4 Flash.fla file, I want to make them available to dynamically add to the display list as children, based on the button clicks of the viewer. I can get it all to work fine via Symbol Properties > Linkage > Export for Actionscript.
    BUT - When the movie clips are set to "export for actionscript" from the  Library, playback seems to hang on frame 1 until all of these  exported assets have downloaded. The big problem is that I have an ultra-simple but totally custom preloader/progress animation coded in a loop in the second and third frames, which kicks out to frame 4 and continues playback as soon as the download is complete.
    Because of this, the preloader has essentially become useless - because all that can be seen is several seconds of empty stage, until the vast majority of the bulky assets have downloaded. Then the preloader flashes onstage for just an instant, and disappears because the content is already up.
    So, my questions are:
    A)  Is there a SIMPLE alternate method to load these library assets in such a way that it doesn't cause this major lag on frame 1?
    B)  Failing that, I suspect I may have to retool my preloader to run as an ENTER_FRAME event in frame 1.  Is this worth the effort (can this potentially resolve the lag issue and allow for a meaningful preload progress animation, despite the lag from the asset export?)
    Any advice, thoughts, ideas (sample code?) would be greatly appreciated!!
    Thanks in advance,
    </a>
    **Edit follows**
    OK, so after a little more research, I have basically answered this question for myself. I'm updating the post for the benefit of others who may find themselves in my shoes somewhere down the road.
    The solution (as far as I can see) is to pretty much just avoid using the "Export for Actionscript" option for exporting assets to the timeline, as much as possible. Maybe it's fine for a few small assets, but not the best choice for large stuff, which in my case was the lions' share of the content!!
    Or at least don't use the default setting of exporting to frame one!!  This will likely foul up ANY preloader, because essentially Flash player will not display any of the content on frame one until ALL of the content on that frame has fully downloaded - You'll be stuck staring at an empty stage for ages, then when the preloader finally does show up on the stage and run, it will zip by in an instant while (probably) doing its job properly, but it's really only updating on the load progress of the balance of the SWF file.
    The info I found suggested one easy method of making the assets available to Actionscript -- simply just place all of the required library assets into some unseen frame in the timeline, shortly AFTER your preloader runs.  Then Flash Player will load them after the preloader has done its thing, and they will be available to be accessed by Actionscript later in the timeline when you really need them.
    Also FYI -- I also tried changing the export settings to have Flash export the assets in question in frame four instead of frame one, with the unfortunate and unexpected result that my published SWF began skipping playback directly to frame four, which also effectively killed my preloader (which was running in frames two and three.) This glitch remained, even after reverting the export setting back to export the assets in frame one!!  It seems like my .FLA file was irreversibly altered (contaminated??) by changing the export frame setting?!?  Yikes!!
    Luckily I had an earlier version saved under a different file name, it was relatively easy to go back to that version and bring it up to date.
    Anyway - that's all for now. Hope this info can help someone else....
    </a>

    See edit at bottom of original post....

  • I accidentally added a folder to iTunes music library and now all of my songs are in there twice. How do I delete the folder/music i just imported?

    I added a folder accidentally to my iTunes library and now all of the songs are in there twice. I tried to stop the import but it transferred too quickly. How do I delete all those songs without having to click on each one to delete?

    Apple's official advice on duplicates is here... HT2905: How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background, this post for detailed instructions, and please take note of the warning
    to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)
    The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to and should cope sensibly when the same file has been added via multiple paths.
    tt2

  • Trying to upgrade 3.6.28 to 27, imported bookmarks, Library view shows all folders in proper sequence, but 99% are not in Toolbar view at all.

    Jscher and Cor-el tried to help me a few years back w/o success.
    Trying again to upgrade from 3.6 (XP) to 27 (Win7).
    Exported from 3.6 as HTML file (also have json), and imported into 27.
    Last time, I never 'found' most of my bookmarks in FF 27. Especially not the folders.
    This time, I tried Library View and it appears everything is there, folders, subs, in sequence etc.
    BUT ... unlike in 3.6.28, I can still only see the contents of one folder in the right pane at a time.
    I can't work like that.
    SO ... maybe, I can access ALL my bookmarks some other way (not via Library)? Via a toolbar perhaps?
    But for some reason, the collection in the toolbar doesn't remotely resemble the organized collection I see in the Library. Virtually no folders, and in chaotic order. Many missing it appears. If the contents from the Library were mirrored in the Toolbar (using AIOS), I'd be good to go. Is this what I should expect? What more can I try?
    Thanks!!!

    The Library can manage all the bookmarks, but you need to open one of the three main folders in the left pane to see the bookmarks in that folder in the right pane.
    There are three main Bookmarks folders and bookmarks can only be created in one of those folders and its sub folders.
    * The "Bookmarks Toolbar" folder stores the bookmarks that you see on the Bookmarks Toolbar (Firefox > Options or View > Toolbars).
    * The "Bookmarks Menu" folder stores bookmarks that show in the Bookmarks menu and are created via "Bookmarks > Bookmark This Page" or via "Bookmark This Link" in the right-click context menu.
    * The "Unsorted Bookmarks" folder stores bookmarks that are created by clicking the star at the right end of the location bar.

  • I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    Hi,
    May the below code is useful for you, but I dont know how to sort.
    Edit the tag as per your job request.
    alert(app.activeDocument.xmlElements[0].contents)
    //Second alert
    var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
    alert(xe.length)
    for(i=0; i<xe.length; i++)
        alert(xe[i].texts[0].contents)
    Regards
    Siraj

  • Feature Request -Support For All Library Assets Formats

    I would like to request an update to the application to allow full support for all Library asset formats.
    I have recently started using Comp CC to draft layouts. I have found that none of my graphics Library assets can be used due to their format type. This has limited the usefulness of Comp CC as many of my assets are Illustrator vector graphic.

    Thanks for opening our eyes. I spent a good hour trying to place vector graphics into an image place holder before I posted.
    In my defense I find this method less than intuitive. I don't understand Adobe's thinking on separate methods of placing vector graphics & raster graphics. I personally treat all graphics the same vector or raster the are both graphics. This has been the standard workflow for placing image into DTP apps since the beginning.

  • How can I add a library asset to a specific master spread?

    Hello! I am new to the forums and rather new to javascript as it relates to indesign so I apologize if this is rudimentary.
    I am building a script that automates new document creation for our company and have run into a problem with placing library assets.
    I want to add a library asset to a specific master page by name, but I cannot find a way to do this.
    I can get assets to place into my document with this:
                var t = app.libraries.item(0);
                var libTapeStrip= t.assets.itemByName('Tape Strip');
                var myTapeStrip = libTapeStrip.placeAsset(myDocument);
    However, the asset is being placed on a master spread that I had previously added to the document. It seems to be the active or front most spread because when the script is complete and I create a new window that spread is what is displayed with the asset on it.
    I would like to place the asset on another master spread, but placeAsset() only accepts documents and text boxes. I have also looked on a way to bring the master spread I want to the front, but cannot find this either.
    If anyone can lead me in the right direction I would appreciate it!!
    Thanks,
    Ben

    @Benjamin – You could make the spread (or the page) where you want to place that asset the "activeSpread" or "activePage", place the asset and then go back to the old active one.
    Something like this:
    (Here I assume that you want to place your asset on a master spread named "A-Master" and the asset is the first in the one and only library file that is open.)
    var myDocument = app.documents[0];
    var myMaster = app.documents[0].masterSpreads.itemByName("A-Master");
    var myLibrary = app.libraries[0];
    var myAsset = myLibrary.assets[0];
    var myOLDActiveSpread = myDocument.windows[0].activeSpread;
    myDocument.windows[0].activeSpread = myMaster;
    myAsset.placeAsset(myDocument);
    myDocument.windows[0].activeSpread = myOLDActiveSpread;
    Uwe
    Message was edited by: Laubender
    Message was edited by: Laubender [Nothing edited in the code.]

  • During import Aperature wont show all photos on memory card.

    During import Aperature wont show all photos on memory card. Typically loads the previews of the first 15 photos only showing "loading assets" and spinning wheel. Running Aperature 3.2.3 on MBP 2.16 core duo 2gb ram importing from a SD card reader contining approx 300 nikon d3100 NEF files. Created a new user account and new library with same results.

    Could be the card.  Transfer the files to your HD using Finder, and then import into Aperture.  All OK?
    Then reformat your card in your camera, and see if the problem recurs.  Also: does it happen with other cards?  Does it happen with the card in the camera (instead of in your card reader)?

  • Can InDesign or an InDesign script solution tell me if I have hidden elements in a document?

    Can InDesign or an InDesign script solution tell me if I have hidden elements in a document? As in the following examples:
    • I import a picture file and some, or all of the file is not viewable in the picture frame, can InDesign alert me of it?
    • I accidentally place a picture so that it is completely covering another picture, can InDesign alert me the an image is being completely covered by another?
    I am using InDesign CS on a Mac running OSX version 10.4.11.
    Thanks,
    Elliott

    Not out of the box. Perhaps with a script. You can ask in the scripting forum.

  • Scripting the import of style sheets

    Hi Community,
    first of all I'm not an InDesign operator but I try to help a colleague. My question is, if it is possible to import one or more style sheets in InDesign documents without the need to open these documents and without the need of an installed InDesign application on the target server? We are programming a template for using with an InDesign server based application and need the information if it is possible to import new or missing style sheets without downloading each finished document, import the new style sheet and upload it back to server. A workaround with a shell script or something like that, would be very helpful.
    If there are one or more possibiliies it would be great if somebody could point me in the right direction with a link to one or more tutorials.
    Thanks in advance & Bye Tom

    Hi,
    thanks but I think that the requirement, that I have to bring the new style sheets in closed documents, hosted on a remote server, is not covered with this kind of script. I'm not familiar with InDesign scripting but the expression app.activeDocument sounds like that the target document have to be at least accessible by the local InDesign client. But in our case this isn't possible. We only can execute a script on the target server and have to access hundreds of indd documents, stored in the file system of the server. Please let me know if I lose sight of something.
    Thanks for your attention & Bye Tom

  • Indesign Scripting Object Model

    Hi,
    Is there some reference documentation that provides detailed information on the Indesign object model as exposed to the scripting interface (javascript)?
    I have done fair amount of scripting in Illustrator so I was looking for the Indesign equivalent of this document
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scrip ting/illustrator_scripting_reference_javascript_cs5.pdf
    I looked at this document but it seems kind of sparse (compared to illustrator)
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/indesign/pdfs/InDes ignCS5_ScriptingGuide_JS.pdf
    Obviously they are different applications but I was kind of hoping there would be more info for Indesign scripting.
    In particular I am looking for some insight on how to effectively walk or traverse the document structure of an indesign document using code.
    Finding specific things by type seems out of the picture becuase after doing object reflection on all the page items in an indesign document nothing seems to have a "type" property.
    In my illustrator scripts I was able to place stuff in illustrator layers, give arbitrary pageitems a name and then later go find and manipulate via script. Not as clear how to do this in an indesign context.
    The one advantage of this was that in illustrator I was able to use textframes to hold variable data and read later via scripts. The document becomes the database. And I could create any number of arbitrary "variables" inside the document outside the white board. WOndering how to do this kind of stuff with indesign so I can do template driven documents that are managed by scriptings and form UI that I create.

    commnet: Glad to hear you're clear on the new keyword. It's something that a lot of people are confused about.
    Also glad to hear you've read Crockford's book on this stuff. Honestly I think for most InDesign usage, it's a mistake to worry about any kind of inheritance...usually it's easier to ignore all that stuff.
    And to answer the question about number of properties, probably talking max 100 or so. Certainly not thousands. I just want to have my own datastructure embedded in the indesign document that I can easily talk to via scripts. And this data needs to persist between instances of the javascript script's lifecycle. So it seems having some XML to parse is the solution. If that makes sense.
    If there was a way to deal with JSON data "hidden" within an indesign document I would gladly work with that. But I still need to change certain common content snippets inside the flow of the indesign document in a consistent way.
    I think if you have max 100 properties, you should probably choose the methods that are clearest code, rather than most efficient. I suppose you might have noticable delay with 100, though, obviously try it and see. I'm confused but I thought you needed to have your data associated with text elements inside your document, such that it is visible to a user in the user interface. Hence the proposal of using XML tagged text inside a Text Frame. Did that requirement go away?
    If you just want to hide JSON in the document, then use document.insertLabel() of a string of JSON and be done with it.
    You can also use the JavaScript interpreter's E4X features, that give you much richer Javascript bindings for manipulating XML objects and files. Unfortunately the Javascript's XML bindings have nothing to do with the InDesign XML object model. So could, e.g., export the InDesign DOM XML into a file, read that into a Javascript XML object, manipulating with E4X functions, write it out to a file, and then re-import it into the DOM. Not really very convenient.
    I honestly don't know much about Javascript for browsers, so if you could be more concrete in your queries it would be easier to answer.
    Looking forward to your example snippet though.
    OK, so, in Jeff (absqua)'s example, you create a constructor for a changeNumber rule, you call the constructor to make a rule, add the rule to the ruleset, and change a value attribute of the rule, and then process the ruleset.
    This strikes me as...extremely goofy. For two reasons, first the ruleset creation function should be parametrized with the value you want to change, and second, that you go change the rule's attributes after you have added it to a ruleset. Also, while this works in this example, I don't think it's appropriate to have the xpath attribute hardcoded in the rule creation function -- it's much plausible that you want a function that constructs a rule that changes some arbitrary tag to some arbitrary value.
    So, anyhow, if you were going to stick with the constructor paradigm, then I would change from:
    var changeNumber = new ChangeDocumentNumber();
    var ruleSet = [changeNumber, changeDescription];
    changeNumber.value = "5678";
    __processRuleSet(doc.xmlElements[0], ruleSet);
    to:
    var changeNumber = new ChangeDocumentNumber();
    changeNumber.value = "5678";
    var ruleSet = [changeNumber, changeDescription];
    __processRuleSet(doc.xmlElements[0], ruleSet);
    But I don't like this, because it's not parametrized reasonably. I would want something like:
    var changeNumber = new ChangeValue("//DocumentNumber", "5678");
    var changeDescription = new ChangeValue("//DocumentDescription", "New descr.");
    var ruleSet = [ changeNumber, changeDescription ];
    But because of my disdain for classical inheritance in JavaScript, I would instead write it as:
    function changeValue(xpath, newValue){
      return {
        name: "ChangeValue",
        xpath: xpath,
        apply: function(Element, processor) {
          if (newValue) {
            element.contents = newValue;
          return true;
    var changeNumber = changeValue("//DocumentNumber", "5678");
    var changeDescription = changeValue("//DocumentDescription", "New descr.");
    Because I think that a lot clearer about what is going on without introducing confusion.
    Edit: removed "this.value" from the above and just used newValue directly.
    But if you're defining a lot of rules with different apply functions, this is a very cumbersome strategy. You have all this boilerplate for each function that is basically the same but the apply function is different. This is leads to a lot of wasted code duplications. Why would your apply function be different? Well, that would usually be if you are writing functions that move around XML elements within the document hierarchy, or other things that are not simply changing the value of an element.
    I would much prefer to write this as:
    var changeRule = makeRule("change",
      function(element, ruleProcessor, newValue) {
        element.contents = newValue;
    var changeNumber = changeRule("//DocumentNumber", "5678");
    var changeDescription = changeRule("//DocumentDescription", "New descr.");
    var ruleSet = [ changeNumber, changeDescription ];
    This kind of syntax makes it much more compact to create arbitrary rules with different apply functions. In retrospect, the makeRule() function is named wrong, because it returns a function that makes a rule. Perhaps it'd be more reasonable if it was called makeRuleMaker().
    Anyhow, the downside is that the makeRule() function is kind of heinous. I wrote this in March in Re: How to shift content with in cell in xml rules table. But:
    //// XML rule functions
    // Adobe's sample for how to define these is HORRIBLE.
    // Let's fix several of these problems.
    // First, a handy object to make clearer the return values
    // of XML rules:
    var XMLmm = { stopProcessing: true, continueProcessing: false};
    // Adobe suggest defining rules constructors like this:
    //   function RuleName() {
    //       this.name = "RuleNameAsString";
    //       this.xpath = "ValidXPathSpecifier";
    //       this.apply = function (element, ruleSet, ruleProcessor){
    //       //Do something here.
    //       //Return true to stop further processing of the XML element
    //       return true;
    //       }; // end of Apply function
    // And then creating a ruleset like this:
    //   var myRuleSet = new Array (new RuleName, new anotherRuleName);
    // That syntax is ugly and, and is especially bad if
    // you need to parametrize the rule parameters, which is the only
    // reasonable approach to writing reasonable rules. Such as:
    //   function addNode(xpath, parent, tag) {
    //       this.name = "addNode";
    //       this.xpath = xpath;
    //       this.apply = function (element, ruleProcessor) {
    //           parent.xmlElements.add(tag);
    //           return XMLmm.stopProcessing;
    // and then creating a ruleset like:
    //   rule = new Array (new addNode("//p", someTag));
    // So instead we introduce a makeRule function, that
    // allows us to leave behind all the crud. So then we can write:
    // addNode = makeRule("addNode",
    // function(element, ruleProcessor, parent, tag) {
    //     parent.xmlElements.add(tag);
    //     return XMLmm.stopProcessing;
    // and use:
    // rule = [ addNode("//p", someTag ];
    function makeRule(name, f) {
        return function(xpath) {
            var
                //xpath=arguments[0],
                   // "arguments" isn't a real array, but we can use
                   // Array.prototype.slice on it instead...
                   args=Array.prototype.slice.apply(arguments, [1]);
            return {
                name: name,
                xpath: xpath,
                apply: function(element, ruleProcessor) {
                        // Slice is necessary to make a copy so we don't
                        // affect future calls.
                    var moreargs = args.slice(0);
                    moreargs.splice(0, 0, element, ruleProcessor);
                    return f.apply(f,moreargs);

  • InDesign and Applescript - Another place asset question.

    I am trying to place an asset on page but am having some problems.  If I have an asset in my library and it has a few items in like a couple text boxes and images and they are grouped together, it places fine but then I have a problem with trying to change styles for any individual items withing that asset because seems to treat group as item 1 of that asset and can't seem to get to reference individual items of asset that has grouped items.  Tried things like "item 1 of placed asset" but treats that like group which is good for move but not when wanting to reference individual items.  When I create placed asset with all individual items ungrouped then it does allow me to apply styles on individual items but then can't move everything to location as a group so allignment all stays correct.  Thinking that maybe I could either ungroup all items in first scenerio after moving then apply styles but not sure how to refernence that group and then the items within that group when ungrouped.  Or, doing second scenerio where load asset ungrouped then apply styles then group and move but since number of items in assets can be different, not sure how to dynamically create group using repeat or something?  Thanks, Joe
                 repeat with i from 1 to count csvEntries
                        set csvEntry to csvEntries's item i
                        set {fldElement, fldLocationX, fldLocationY} to csvEntry's text items
                        set placedAsset to place asset asset fldElement of library "GTElements.indl" on myDocument
                            move placedAsset to {fldLocationX, fldLocationY}
                        -- apply styles to individual items os asset
                        -- Then, can I create group dynamically for all items in asset if ungrouped?
                        -- set myGroup to make group with properties {group items:{ placedAsset}}???
                        -- then move group to location?
                        -- Or
                        -- can I ungroup asset if comes in already with all items grouped
                        - First, move to location everything as a group then ungroup
                        --    tell placedAsset
                        --           ungroup
                        --    end tell
                        -- Now apply styles to individual items.   

    I was working on script which uses dialog window. When you run script window with listbox pop up and than you can choose asset with shortcut. This is fastes way for placeing assets from library.
    Did you try this
    var myplacedasset=app.libraries[libIndex].assets.item(assetName).placeAsset(app.activeDocumen t);
    Do what you want to do (apply object syles etc)
    app.select(myplacedasset);
    In this case you don't need to group item, you just select them and move selection to desired position.

  • Indesign Script for placing excel-file

    Hi all, I'm new to Indesign Scripting, and I'm hoping someone can help me with the following code:
    All I want to do is:
    open indesign file
    open excel file
    place excelfile as a table (with flow enabled)
    save document & export as PDF
    Thanks!
    //Define file to open
    var myDocumentFile = new File("/d/Projecten/Indesign Server/document.indd");
    //Define file to save
    //var mySaveFile = new File("/d/Projecten/Indesign Server/document_save.indd");
    //Define file to export
    var exportPDF = new File("/d/Projecten/Indesign Server/document_save.pdf");
    //Open xls-file to place as table
    var myExcelFile = new File ("/d/Projecten/Indesign Server/products.xls");
    var result = "";
    if(!myDocumentFile.exists) {
        result = "Unable to find DOCUMENT:  " + myDocumentFile.path;
        $.writeln(result);
        exit();
    } else if(!myExcelFile.exists) {
        result = "Unable to find EXCEL:  " + myDocumentFile.path;
        $.writeln(result);
        exit();
    } else {
        // Open file
        var myDocument = app.open(myDocumentFile);
        with(app.documents.item(0).pages.item(0)){
            myTarget = textFrames.item("tabel");
        var myPage = myDocument.pages.item(0);
        //Set excel placement properties
        setXLimportPrefs();
        // Place Excel file
           try {
                 $.writeln("Place Excel file");
                //HELP!! HOW TO PLACE EXCEL FILE?
                //myTextFrame.place(myFile);
            catch (e) {
                 $.writeln("Place Excel file "  + e + " " + app.excelImportPreferences.errorCode);
                myDocument.close();
                exit();
        if(!exportPDF.parent.exists && !exportPDF.parent.create()) {
            result = "Not exported.  Unable to create the folder:  " + exportPDF.parent.fullName;
            $.writeln(result);
        } else {
            app.documents.item(0).exportFile(ExportFormat.pdfType, exportPDF, app.pdfExportPresets.item("[Press Quality]"));
        myDocument.exportFile(ExportFormat.PDF_TYPE,exportPDF);
        myDocument.close();
    function setXLimportPrefs(){    $.writeln("setXLimportPrefs()");
            with(app.excelImportPreferences){
                //alignmentStyle property can be:
                //AlignmentStyleOptions.centerAlign
                //AlignmentStyleOptions.leftAlign
                //AlignmentStyleOptions.rightAlign
                //AlignmentStyleOptions.spreadsheet
                alignmentStyle = AlignmentStyleOptions.spreadsheet;
                decimalPlaces = 4;
                preserveGraphics = true;
                //Enter the range you want to import as "start cell:end cell".
                rangeName = "A1:B16";
                sheetIndex = 1;
                sheetName = "Appetizers";
                showHiddenCells = false;
                //tableFormatting property can be:
                //TableFormattingOptions.excelFormattedTable
                //TableFormattingOptions.excelUnformattedTabbedText
                //TableFormattingOptions.excelUnformattedTable
                tableFormatting = TableFormattingOptions.excelFormattedTable;
                useTypographersQuotes = true;
                viewName = "";
    result;

    "I just loaded a table into a text frame but it still contains nothing". I wonder how I'd check that, actually.
    @Jongware:
    To prevent this situation you could set the max. allowed cell height below your min. text frame height.
    If this is not applicable, because in some situations you cannot know the usable text frame height beforehand, you can iterate through all your set rows and check if the parentTextFrames[0].parentPage.name property of the first insertionPoint of its first cell is defined. If it's undefined and your last text frames parentPage.name is not equal to the last defined parentPage.name of your check your table will remain overset.
    Thinking about that method I must admit, that you can get a false positive, if a text wrap object on an applied master page comes into play…
    So no, I see no fail-safe check for this situation.
    Uwe

  • Import Fixed Assets data

    Hi all,
    I got error msg when i import fixed asset data, the format data already follow the import template.
    This is the error msg:
    Time     AppID     ExtID     Sev     Scope     Message
    2008-01-29 13:02:55.678      0     BA     ER     CBAMasterDataTransfer::CBAMasterDataTransfer     Year Values: INVK001;Z-007-IKA;Handycam Sony;;2005-01-31;;;;;;;;7247000;;;100;2005-02-01;48;25;LINP;166679896;;1/1/2007;690;23;;;;200;2005-02-01;48;25;D20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    2008-01-29 13:03:00.037      0     BA     ER     CFrmMasterDataTransfer::FormPutData     Exception caught!
    I use SAP 2005A PL 31 and Fixed Asset version 65
    Thanks in advance
    Dody

    You have a date in your data sheet that is formatted 1/1/2007, this needs to be formatted as 2007-01-01, I think it is the depreciation start date?

Maybe you are looking for

  • Novice Question:  XML File using FTP Adapter Help Requested

    I need to create (publish) a message from an XML file that is written to a particular folder on a Win2000 machine (I intend running the adapter on the same machine). I think that the FTP adapter should be the easiest way to do this but I have only us

  • Date Range as Parameter

    Hi ,          I have a column with date range in the format 07/21/2014-07/21/2014,         07/16/2014-07/16/2014        07/22/2014-07/22/2014 there will be thousands of records like this. In ssrs I need to pass a pramater with date range =07/16/2014-

  • Sudden change in settings

    <p>Hi! Suddenly the order of the topics in every section of the forum has changed. Now to view any recent post in which i have poted, I have to change the pages so as to see the recent post by anyone. I will be glad if any of the modetators or admini

  • Having trouble with upgrade OS X Yosemite 10.10.3

    Pictures for ads while using Safari do not appear. Only a ? mark shows up in the center.  Several web sites will not open.  Did not have this problem before I down load the upgrade/update for the above OS X Yosemite.  Is anyone else having this probl

  • Vashikaran specialist baba ji SPAM

    Love Marriage Specialist in Mumbai Mob. no. get SPAM solutions for all problems within few hours on spam call . VASHIKARAN SPECIALIST , ASTROLOGY SPECIALIST,LAL KITAB ,KUNDLI MILAP,GEMSTONE ,HYPNOTISM , NUMEROLOGY,BLACK MAGIC,VASHIKARAN MANTRAS, Inte