Undefined IDCC2015 (MacOSX 10.9.5) is not an object when you reference dataMergeProperties.selectDataSource

Hello everyone.

I worked on a script that works on an InDesign file open with the data merge fields. During the run, the script asks the file to a directory of text files, then a directory to put the PDF files resulting. It looks like this:

#target indesign
main();

var myDoc = app.activeDocument;//the indesign file that is currently open  
function main() {
     var f = Folder.selectDialog("Select the text files");
    var finished = Folder.selectDialog('select folder for finished PDFs').fsName + '/'; //selects a folder to put the finished files
    if (f == null) return;
    var files = f.getFiles();
    var imgs = new Array();
    var file, ext;
    for (var n = 0; n < files.length; n++) {
        file = decodeURI(files[n].name);
        ext = file.substring(file.lastIndexOf(".")+1,file.length);
        if ( ext == "txt" || ext == "csv" || ext == "TXT" || ext == "CSV") {       
            imgs.push( file );
        }
    }
    for (var n = 0; n < imgs.length; n++) {
     var mergeTo = f.absoluteURI + '/' + imgs[n];   
     var pdfTo = finished + imgs[n] + '.pdf'
    myDoc.dataMergeProperties.selectDataSource(mergeTo);
    myDoc.dataMergeProperties.exportFile(finished, "[High Quality Print]", );
           }  
    }


As I scroll through the script in debugging in ESTK, everything seems well of until line 22 when I get "undefined is not an object. But when I look at the data browser, everything looks like need where it is:

Screen Shot 2015-07-22 at 9.02.02 pm.png

My thoughts are that it has something to do with the name of file used by selectDataSource referencing. But I tried dozens of permutations of the naming of files using fsName, absoluteURI, and really, I'm stuck... and have been for some time. I tried is not to worry about the forum, and I am sure that my coding must be correct, but it is obviously not. Pointers to solve this would be appreciated.

Colin

Hello

I would modify 2 lines:

1. first line with var main() statement and call after / / if think it is source of error ==> no myDoc defined

2 myDoc.dataMergeProperties.selectDataSource ( leader (mergeTo) ) / / instead of the string

Jarek

Tags: InDesign

Similar Questions

  • My USB to ethernet adapter works only if plugged into my MacBook Pro. I tried to use to start an expander USB (power strip), but this has not--a problem when you have only TWO USB ports ports! Any suggestions?

    My USB to ethernet adapter works only if plugged into my MacBook Pro.

    I tried to use to start an expander USB (power strip), but this has not--a problem when you have only TWO USB ports ports!

    Any suggestions?

    Juice what 'expander' did you use?

    What model of MacBook Pro?

    This is the Office Mac Pro forum. I asked that your post be moved to the MacBook Pro laptop forum.

  • Folders of bookmarks in Safari in the Favorites bar not open click when you access one after another

    Question: The records of Safari bookmarks in the bookmarks bar not open click when you access one after another

    Diagnostic steps:

    (1) create 2 or more folders in the bookmarks with the individual sites in their breast.  (Examples of folder name: career, finances and health)

    (2) safari > display > display favorite bar. All the Favorites should be visible in the main window of Safari with all these files

    3) click on the folder named career and then go directly to Finance. (the record finance should open with a single click)

    (4) or try to open the folder of health directly after clicking on career record. The health record is expected to open in one click. This does not currently happen

    Currently, 2 click are required to open a folder in the Favorites bar. To activate the button and the second displays the Web sites it contains.

    It is annoying and seems as if the browser is obsolete.

    If opening cursor hover is not what apple wants for these records, we are fine with it. But the least we should do, it's that these files opens in one click.

    Thank you.

    Send feedback to Apple. They will not respond, but at least know that there is a problem. If enough people send feedback, it can become the problem solved as soon as possible.

    Your comments

  • Have 2 printers on the computer and the PC will not print one when you switch to the other?

    Have 2 printers on the computer and the PC will not print one when you switch to the other?

    Having a printer at the office and one at home, but use the same PC for both? Unable to print at home after bring you it to the office (and vice versa)?

    If you USB, most of the time, the PC will recognize what printer is which. Sometimes PORTS does not commute. You can manually change the correct ports if necessary.

    CLICK ON THE MENU START

    1 devices and printers

    2 right CLICK on the printer

    3. choose the PRINTER PROPERTIES

    4. click on PORTS

    5. There will be a list of ports with one (checked marked). If it's on the wrong port, change to the right pair and choose APPLY.

    (NOTE: it must ALWAYS be on a USB port or a wireless connection.) Some ports wireless start with a #(adresse IP) or a SERIAL number)

    I hope this helps. Sometimes, you can create your own port if you have more questions.

  • My Windows Media Player does not open upward when you click it in the list of available programs, nor will any media over the internet using Windows Media does not work

    My Windows Media does not open upward, when you click on Window Media Player in the list of available programs nor play any internet media using the Media window. I have the 110.6002.18311 version. Any help to fix this problem will be appreciated.

    Hello

    You can try to re register the dll files for windows media player and if it helps fix your problem. To do this, please follow the steps below:
    1. Click Start, type cmd in the search box and right-click on cmd.exe, and then click Run as administrator.
    2. At the command prompt, type the following commands and press ENTER after each command:
    regsvr32 vbscript.dll
    regsvr32 jscript.dll
    regsvr32 wmp.dll
  • Hello, I'm willing to give up my bundle of photography (Photoshop + Lightroom) project. I tried to do if however the plan itself does not appear here, be as creative cloud storage and on that there do not cancel option when you manage the plan. Its defini


    Hello, I'm willing to give up my bundle of photography (Photoshop + Lightroom) project. I tried to do if however the plan itself does not appear here, be as creative cloud storage and on that there do not cancel option when you manage the plan. Its really here because I'm still charged monthly for it. Any cancellation help please?

    Cancel see answer #1 in https://forums.adobe.com/thread/2023066 - includes a link to Chat from Monday to Friday

    -or directly at this link https://helpx.adobe.com/creative-cloud/help/cancel-membership.html

  • Network error [10053]: can not send data when you run a calc in Planning

    Hi gurus,

    I get a network error [10053]: can not send data when you run a calc in a planning application.

    Looking in the newspaper of the App in Essbase server, I found the following:

    [Thu Apr 9 15:37:36 2014] Local/MYAPP / / / 140285871445760/Info (1008108)

    Internal logic error Essbase [1]

    [Thu Apr 9 15:37:36 2014] Local /MYAPP///140285871445760/Info(1008106)

    Exception error log [/Essbase/oracle/Middleware/user_projects/epmsystem1/diagnostic/newspapers/essbase/essbase/app/MYAPPlog00004.xcp] is being created...

    [Thu Apr 9 15:37:36 2014] Local /MYAPP///140285871445760/Info(1008153)

    A core file can be generated in [/Essbase/oracle/Middleware/user_projects/epmsystem1/EssbaseServer/essbaseserver1/app/MYAPP/ESSSVR.] Wed_Apr__9_15_37_02_2014]

    [Thu Apr 9 15:37:36 2014] Local /MYAPP///140285871445760/Info(1008107)

    Exception error log completedmyapp/Essbase/oracle/Middleware/user_projects/epmsystem1/diagnostics/log/essbase/essbase/app/MYAPPlog00004.xcp please contact technical support and provide them with this file

    [Thu Apr 9 15:37:36 2014] Local /MYAPP///140285871445760/Info(1002089)

    RECEIVED COMMAND OF THE UNUSUAL STOP - REQUEST FOR TERMINATION

    My environment is Windows 2008 R2 with Oracle Database and having only Essbase server in a SUSE LINUX box.

    Could someone help me on this?

    Thanks in advance

    We've tracked down the instructions in the calc and the error occurs in two blocks of calc. After the split in two blocks of the calc has no error more.

    Thanks to you all

  • All trying to deploy Linux VM model using PowerCLI, during customization in error that "do not provide dns when you create NIC mapping for customization with type 'Linux" ".

    All trying to deploy Linux VM model using PowerCLI, during customization in error that "do not provide dns when you create NIC mapping for customization with type 'Linux" ".

    See my response on the other thread where you posted the same question.

  • "Non-rectangular objects will not display correctly when you export with the help of CSS."

    I use Ind CC 2014 export a document to an epub recomposable.  The document contains a picture .ai.  The image export correctly in some parts of the the.epub, but not others, when it is deformed. There is a warning on export: "Non-rectangular objects will not display correctly when you export using CSS."  Any suggestion is appreciated.

    Hello

    For these objects, the best option is to 'rasterize container"to preserve appearance of the page layout setting in the Options of the Export Object dialog box and then export to EPUB recomposable.

    Kind regards

    POOJA

  • Fans not correctly detect when you present to the RPM

    Why my 13 "2015 MB Pro fan not totally crank when the cpu temperature is like 100ᴼ? For example my CPU Core 1 is 80ᴼC and my Core 2 CPU is 100ᴼC, my GPU Core even 78ᴼC yet the rest fan 1300 rpm, whereas at this stage at 4000-6000 RPM.

    Is it because I have iStat Menus active? I put rules fan on this OFF application preference so he shouldn't meddle with the fan in addition to giving my sound status.

    I also wonder, Google Chrome would heat my laptop for the h

    Check your MacBook Pro with Apple Hardware Test if thermal sensor is something wrong.

  • ADDRESS BOOK NOT BE DISPLAYED WHEN YOU TRY TO SEND E-MAIL,

    address book is not displayed when you send an email. Normally, when I send an email, I click on the front, and the address book appears on the left side of my screen.
    also, when I bring my address book, it takes half of the screen, when I click on the arrows to shrink the screen, it takes away the names and the addresses.help please!

    When you open a window of writing and click VIEW in the menu bar is framed verified contact?

  • Firefox did not always stop when you press Alt + F4

    When I press Alt and F4, it often happens that the window closes, but the process does not stop. After that I closed Firefox and tried to restart, it opens only every second or third time without error messages. When it opens correctly, it shows the following error message, "Firefox is already running but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. »
    When I look at the Task Manager, it shows that the firefox.exe process works, but doesn't show any activity (FYI, the memory usage is normal). The process is shown here as a background process (FYI, a feature to win 8 and background processes are visible only in the detail view of the Task Manager). When I stop the task, Firefox open regularly.
    So, the problem is that when Firefox must be closed windows are closed, the process does not stop.
    This problem happened very rarely with the previous version of Firefox, Firefox 29, it turns as often as described above.

    Hello Haris o InStr, unfortunately it's currently a bug in the current version of firefox when you set your story to be erased at the stop of firefox - which is the subject of an investigation and by train to be fixed by the developers of mozilla with a high priority.

  • Pavilion Notebook M1Y13UA #ABL: clickpad does not respond immediately when you tapoterez

    Hello

    I have constant problems with the clickpad installed on my laptop. I can say that it is the touchpad/clickpad WORSE I've EVER had. It has been repaired twice by HP under my warranty coverage. First of all, they have changed a few son/cables inside and completely uninstalled Windows 10; Then, because the problems were still present, they installed a new clickpad, which changed the hardware. Some issues have been resolved, but others continue to be present.

    At this point, I'm trying to any parameters used for the clickpad, via settings-> devices-> mouse and touchpad-> properties of the mouse-> settings-> properties for Synaptics ClickPad ClickPad, very often, but not always, the clickpad is not responding when I type the first time after that I was doing something else. When I type the second or third time, I'm finally starting to get answers. In other words, whenever I type somewhere - to close a window, to follow a hyperlink, to place the cursor in a text, to select a part of a text, etc. - my first tap does NOTHING. I must repeat my cock at least once more before there is a response. I can type very gently or hard, it doesn't matter. It applies both to pressure alone to double tap. It is the same for the two fingers tapping.

    Pointing-> sensitivity feature is at its maximum. (If I reduce, the clickpad becomes even more that don't meet liked). Smart Sense functionality is almost extinct. (If I put it near Max, nothing changes.) Filter activation time option, which apparently blocks the clickpad for a certain period of time after you type, is zero. For the feature settings-> devices-> mouse and touchpad-> Touchpad (to help prevent the cursor to move accidentally while you type, change the time before work clicks)-> without delay. Turning or turn off of the button (on the clickpad) doesn't change anything. Clicks properly. All the drivers are up to date. All Windows 10 operating system up-to-date. When I attach my USB mouse, the mouse works fine, there is no delay in responses.

    I assumed that contacting HP for the third time will be not successful. Anyone have the same problem? If so, how to solve it? Other users seem to have had a similar problem (http://h30434.www3.hp.com/t5/Notebook-Hardware-and-Upgrade-Questions/Synaptics-Clickpad-Smartsense-M... but not found a solution.)

    Thank you very much in advance!

    I think that I recently found a solution (a partial solution at least) for this problem. The root of the problem seems to be the drivers supplied by Microsoft. The pilots, even new ones, for this clickpad are just horrible.

    What is worse, updates to these useless drivers are installed in my system without any agreement from me either. Try to avoid updates, using a Microsoft program (https://support.microsoft.com/en-us/kb/3073930 ), doesn't help - for the clickpad updates are installed in any case.

    What I did to make my clickpad works much better is the following:

    1. Download a driver directly from the author of the clickpad, Synaptics (http://www.synaptics.com/resources). For my camera, I used "Windows 10 I2C v19.0.19.1 devices". Do not install the driver again, your system will you not allow to do so due to a 'new' version of the driver 'already installed '.
    2. Disable automatic updates of your operating system, using the Protocol according to (http://www.thewindowsclub.com/turn-off-windows-update-in-windows-10). This change is not permanent, you can always activate the automatic system updates, if you wish. Of course, if you enable automatic updates, Microsoft crap drivers will be installed automatically too, deletion of all other good drivers you have installed previously.
    3. Completely uninstall the driver automatically installed for the clickpad using Device Manager (you can advance this Manager by right-clicking the Start button). Restart the computer, as required in a message box.
    4. Install the driver previously downloaded from Synaptics. In my case, I don't have to install manually, my system installed this driver 'default', without doubt, as the only available driver for clickpad on my hard drive.

    Here are the steps that I have lived to correct the problem. Now my clickpad is not as frustrating as it used to be. Make sure when you try these steps, they may not work in your particular case, because your computer might have a few important differences from my camera.

  • iPhone 6 s is not wake up when you remove the cable from the charger.

    Hi all.

    I noticed that sometimes my iPhone didn't wake not (the lock screen display) when the charging cable is removed. the charger / sync port seem otherwise works normally.

    Is this normal?  I'm guessing that this happens because sometimes when the battery is fully charged, no power goes to the phone and if you pull the cable then, the phone can't tell you have removed the cable, but I have not seen this happen on my previous phones.

    Thank you!

    Yes, this sounds like normal behavior! On my iPhone 6, when it reached 100% of their capacity and is completely loaded, as it stops in charge, which is why when you unplug the iPhone from the charger the screen does not automatically wake up, because the charger stopped output power to the iPhone when it finished filling. I hope that answers your question!

  • I installed a new sound card and it now says pilot active but not turned on, when you look at the system properties, it is there, but there is no sound at all.

    I installed a new sound card, but it will not play sounds.

    When I look at the properties under system it says driver active but not lit.

    If I try and download the latest driver it says that you have the most updated version.

    When you have a look at the sound properties it shows nothing.

    Hello

    · What is the number and the model of the computer?

    · What is the exact message you read?

    · What service pack is installed on the computer?

    Run this utility from the link below: no sound in Windows: http://windows.microsoft.com/en-us/windows/help/no-sound-in-windows?T1=tab02

Maybe you are looking for

  • I can no longer send email TB but still receive.

    TB left, recently, allowing me to send e-mail messages. I always receive mail, but when I try to send messages, I'm invited to a password. It does not accept the password. I can send messages to my iphone and a mail app on the web, is not a problem w

  • Pavilion Slimline s5700 Series: is it possible to add an SSD?

    I have a s5770t on the way and I was wondering if it would be possible to add a form factor 2.5 "SSD system (i.e., having both the SSD and the original hard drive)? I looked on this issue online support documentation, but only came to how to replace

  • text does not appear in the preview when preparing print

    I have a report that I was preparing to print. When I click Print Preview, the text shows on the screen, but when I click on print, comes from the Preview on the screen, but no text shows.

  • Is there a way to allow the end user to change the font color in a text field?

    I didn't know that LiveCycle existed yesterday so I was using the Google a lot.I'm building an application form and asked if there was a way to change the font color in a text field. (EXAMPLE: content Original is black.) The notes are in red)I have 2

  • Cannot add local storage

    The internal ServeRAID controller shows two LUNS - LUNS RAID1 for ESX and the RAID0 which is empty and must become a VMFS volume. When you go to "add storage", it only shows the first unit number logic that ESX is on.How can I allow the second LUN VM