ID.CS3: Make Data Merge more useful?

Data merge is a useful function of Indesign but its scriptability is limited. I've searched this forum and found some scripts that run a pre-linked ID document. I'm trying to script the linking of fields with known text strings.
Looking at the dictionary I see that the only thing that has read/write is properties.
My attempt to see what properties I can read/write seems to only point to its own reference.
Is this part of data merge (assignin fields to text strings) just not scriptable? thanx, sam

OK, here is my latest attempt to take what Olav's javascript uses and apply it to Applescript. I'm stuck on applying the myNamePlaceholder as notedby  by myNamePlaceholder:
It yields no placeholder. But I believe I've done it right because I've followed the record generated when I manually make a placeholder and get the data merge text placeholders of document 1. What am I missing?
thanx, sam
set myTextFile to ("path:to:working:date.txt") as alias --I'm using a text file that works manually.
tell application "Adobe InDesign CS3"
set {find text preferences's find what, find change text options} to {"[Sample Name]", nothing}
tell document 1
tell data merge properties
select data source data source file myTextFile
set myDataMergeProperties to properties
end tell
set allObj to (find text)
set objCt to count of allObj
repeat with thisObj from 1 to objCt
set NameObj to item thisObj of allObj
set myStory to parent of NameObj
set myFrame to parent text frames of NameObj
set NameObjOffset to item -2 of insertion points of NameObj --of myFrame
set dmFcount to count of every data merge field of data merge 1
repeat with i from 1 to dmFcount
if field name of data merge field i of data merge 1 is "FirstName" then set myNamefield to object reference of data merge field i of data merge 1
end repeat --dmFcount
set myNamePlaceholder to {story offset:NameObjOffset, field:myNamefield}
set {myNamePlaceholder} to end of data merge text placeholders
return properties of data merge text placeholders
--yields {} if I have no placeholders manually made. If I have manually made a placeholder, it yields only the manually made placeholder. What am I missing?
tell myStory
end tell
end repeat -- iterate over each instance of obj
end tell --doc1
end tell --app

Similar Messages

  • Dose Indesign CS3's Data Merging List not surpport double byte language?

    Please help?
    Dose Indesign CS3's Data Merging List not surpport double byte language? But Indesign CS2 works well with Chinese Language!

    I just did a test, in IDCS3 with a mixed English/Traditional Chinese/Simplified Chinese/Korean tab-delimited text file, and after some coaxing, it worked like a charm.
    1) I did it with a Unicode-encoded tab-delimited text file. When I went to "Select Data Source," I checked the "import options" box so that I could specify that the text file was Unicode. (What encoding is your data merge source file?)
    2) When I hit Preview, I realized that I'd set the generic form letter in a font that had no Korean support, so I had to select an appropriate font with Korean glyphs. (Are you using a font in ID that has Chinese support? I assume so.)
    So, yes, Data Merge works with Chinese characters. I didn't test it with csv, but I will if you're stuck using it. If you're starting with an Excel file, it's not hard to get it to spit out a tab-delimited Unicode text file.

  • Make Data Merge import certain page of pdf or indesign document

    I don't know if it is possible but can you make Data Merge import certain page of pdf or indesign document, this would be great addition for indesign

    Here are a couple of questions that might help understand what might need to be done to achieve your request:
    * How do you propose to identify the desired page(s) within a PDF and an ID document, so the merge field placeholder knows how to find it?
    * How do you propose to keep track of the page if they're re-ordered in an updated document?
    * What if the identification marker is within text and flows to a different page - would you want to retrieve the original page (before the reflow) or the new page to which the marker would have flowed?
    Perhaps the scripters could comment on the possibility of scripting these.
    Peter Gold
    KnowHow ProServices
    aybekDes wrote:
    I don't know if it is possible but can you make Data Merge import certain page of pdf or indesign document, this would be great addition for indesign

  • Extracting an image data merge field using only an indesign file and not document.dataMergeProperties.dataMergeFields

    I have kind of a weird requirement but I hope you guys can help out.
    I need to extract all the custom fields used in an indesign file without referencing the dataMergeProperties of a document. Sorry if this is a weird request it is just what I've been told (our system needs to not crash when people upload a variety of in design documents to generate high resolution jpg preview documents).
    I can already get all the text custom fields by looking for "<<" and ">>" in the text frames of a document but I'm having a really hard time finding the image custom fields.
    I tried looking at the rectangles for a given page but that didn't seem to help (but maybe i'm missing some there). I also tried looking at the graphics and images collection of a document but this seemed to return only graphics that are hard coded on the in design document and not the custom image fields.
    Any help would be appreciated!

    Found the answer after I realized I was looking at the wrong SDK (5.0 instead of 6.0)
    I'm using the doc.hyperlinkPageItemSources property to get these images. It also looks like you can get the image data merge fields from DataMergeImagePlaceholder (but rememeber I couldn't access this).

  • Cs3 indesign data merge problem

    usung csv from mac numbers spread sheet
    it has 2 columns @photo and numbers ( this column has sequential numbers)
    i create the datamerge no problem at all except
    some of the panels have no photos but do have the number
    how can i delete the data that has no photo
    i have tried going to my csv filea nd deleting the row that has no photo or there was something wrong with the image
    same problem
    i have tried deleting the file row --that is the  row that numbers created--same problem
    any help is appreciated

    made one more attempt and it is obvious i am missing a crucial step--  bear
    with me
    all done on desktop so no path is needed
    i go to iphoto and drag 12 photos into my spreadsheet  ( mac numbers)
    in column a  called @photo--i have left a few rows on top blank and called
    the column @photo
    i created column b and entered sequentially the number of the row which
    corresponds to the photo column
    data saved in csv format
    i go to id
    create a new document
    create 8 x 11 inch document
    create guides 2 rows 2 columns
    in row1 column 1 i create a box and below it in the same panel another box
    i start data merge
    select data--data csv file is found
    i select one of the boxes and select @photo
    and in the other box number
    i select in datamerge options
    multiple records per page
    and select ok
    numbers show up but not photos
    i have gone thru tutorial and others on this--- i know i am doing something
    right as my other attempts semi work
    hope i am not being a pia but it is a pain--i understand about the path but
    i keep all my images and data in the same directory so i understand no path
    is needed
    i keep wondering do the blank rows on top of the column create this problem?
    take care

  • IDCS6 MACOSX JS: Data Merging many txt files one after another

    Hello everybody.
    I have a situation where I have to data-merge many text files to the one actual indesign "base" file. The formats of the databases are all the same, the point of difference is a code in the second field of the database that refers to a mailing zone (not a zip/postcode, a "distribution centre" code that has 56 or so possibilities). I would prefer to data merge one file and then somehow split the resulting PDF via Acrobat, but the length of the resulting mailing zones is inconsistent and something that can't be done though the "split document" feature in acrobat.
    The database starts out as one massive file but using a one-line  code, can be split into its mailing zones into separate text files.
    My ultimate question: is there any way to data merge more than one file at once (e.g. one after another) and give them their names based on the names of the input text file?
    Ole Kvern had a script to Data Merge one file without the UI. I have altered the last line slightly so that it outputs to a PDF based on [High Quality Setting]:
    if(app.documents.length != 0){
            var myDocument = app.activeDocument;
            app.dataMergeOptions.removeBlankLines = true;
            //Select a source file.
            var myDataFile = File.openDialog("Select a data file")
            var exported = "file location(redacted for the sake of this post)"
            if(myDataFile != ""){
                    myDocument.dataMergeProperties.exportFile(exported,"[High Quality Print]",);
    I figure the answer has to do with the variable "myDataFile" and rather than being simply open a dialog, it would be somehow selecting an array of text files, but this is where I am out of my depth.
    Any insights or other thoughts that may not involve trying to do many merges at once but may somehow revolve around one large merged PDF?
    Many thanks

    I've answered my own question, but the answer lies outside of Adobe InDesign – it uses bookmarks within Adobe Acrobat.
    1) Data Merge the art/data to one large PDF file.
    2) In the resulting PDF file, manually search out the mailing zones and apply bookmarks to each first instance only of each mailing zone. In this case, it is a manual process of find/replace to find one of 70 possible mailing zones that may be used in any database. Each bookmark should be named with its respective code. It is a manual process, but it would take 5 minutes so this is acceptable.
    3) Using "Split Document" from the pages panel, make sure the "top level bookmarks" radio button is checked, and in the Output Options make sure that the "Use bookmark names for files" radio button is checked.
    I'm aware that this was a rather obscure question that only a fraction of users on this forum may wish to know an answer for, but hopefully this workaround helps someone else in a similar situation.

  • Data Merge - Is there a way to selectively hide rows/columns from layouts based on cell values?

    I'm using data merge to generate pages from a product spreadsheet. The complication is, some columns should exist for some products (like "qty per bundle") but need to be hidden for others. Is there a way for InDesign to automatically include or remove rows for some pages but not others, based on something like "qty = 0"?

    For logic-based data merge, I use Em Software's product InData.
    Depending upon the design, ID's merge can remove blank fields thereby removing there paragraph or position on a line. Unless, of course, you have static text along with it. Which I almost always do. that's why I use Em Software's solution. It has a trial version. One needs to get familiar with the language statements. But for me it was worth the price and learning curve.
    And there are other plug-ins but for "simple" merging they are overkill in my circumstances (and so cost more).

  • Banner notifications needs to be more useful

    Is there a way (and I'm guessing not) for the current iteration of iOS 5 to helpfully provide some sort of visual indicator that a banner notification was received by the iPhone while it was powered up and running? 
    Notifications received banner style when the iPhone happens to be in locked mode are listed chronologically and grouped by app on the screen, and that's somewhat handy.  A great deal of the time, however, my iPhone is powered up and running -- and I am not always nearby it.  (There do exist perfectly safe places in the world for plenty of people to do this, so don't fret.)  In this case, when a banner style notification arrives, the banner displays at the top just for a few seconds, then disappears forever.  This frustratingly defeats the convenience of such notifications because if I was away from the iPhone when the notification was received, I'll be completely unaware that a notice arrived until I happen to decide to down-swipe to check my notifications.
    Here is what would make notifications much more useful:  the iOS displays an icon (perhaps an "!") to the top bar near the battery/Bluetooth/compass locator icons to denote that the notifications screen has received one or more texts/calls/etc. notification(s) since the last time the user checked.  If space in the top bar is so premium that a thin "!" would be too much, the iOS could simply colorize part or all of the bar.  Said icon (or color) would remain until the user views the notifications screen. 

    This is a user-to-user forum. Submit your feedback directly to Apple using the appropriate link on the Feedback Page:
    Best of luck.

  • Data merge quesiton

    hello indesigners,
    Id like to know how often or how important is the data merge used in indesign?is it for magazine catalogue usage?
    thank you.

    it's one of indesign's hidden gems which is often unexplored.
    my employer uses it to generate everything from catalogues, diaries, business cards, targeted mail campaigns, raffle tickets.
    however, using data merge "out of the box" doesn't do much - it is once it is combined with GREP styles, using DM to import pictures, and taking advantage of excel formulii to build useful instructions as to what to do with the data that data merge becomes useful.
    IMHO data merge is better for many individual pieces such as business cards or raffle tickets rather than catalogues... for catalogues i'd suggest using XML, despite the steep learning curve associated with XML based publishing.

  • [AS] Trying to change Single Record number under data merge?

    Any help would be great?

    This is where I am trying to go with this:
    tell application "Adobe InDesign CS3"
    tell data merge 1 of document 1
    tell data merge preferences
    set record selection to all records
    set records per page to single record
    set record number to 3--or any number or i value I want to repeat with
    end tell
    end tell
    tell document 1
    tell data merge properties to merge records--and merge that one number
    end tell
    end tell
    Setting the record number actually changes the field for single record but when I try to merge said number it does all the records. I am sure its an ordering thing but it is still causing some head scratches. You've all been really helpful with an area that doesnt seem to be detailed anywhere.
    Any help would be great. Thanks.

  • Can I use InDesign's Data Merge for more than just address labels?

    I am a Graphic Designing working on a new science exhibition in Melbourne, Australia.
    I'm trying to streamline the way we import our label content into InDesign (currently cut and paste from Word which is slow and leaves room for error). I've been going down the path of having a macro developed which converts the Word content into a csv file so I can then import this into InDesign through data merge, however the import is falling over.
    Through testing we can conclude that data merge doesn't like paragraph breaks, en-dashes and apostrophies (and possibly more we haven't come across) and will only import data up until one of these items occurs in the data. We've tested a number csv file formats however we can't find a solution.
    Has anyone come up with a solution for this? My macro developer would be keen to get a hold of a working csv file that deals with these issues...

    I have done what you are describing, with Word & InDesign, on a daily basis, for years. Word is not the best choice for this kind of workflow, of course, but if I had to choose between placing Word & doing a data merge with CSV, I'd be torn. Neither one is really the tool for the job. XML import would suit you better, but if you're already midstream in VBA development, there's no point in trying to describe why placing carefully styled RTFs and clearing overrides is better than writing VBA to clean up Word files and turn them into CSV.
    (Look at style mapping in Import Options when placing a Word file for future projects.)
    (Also: it's not extra codings that you want to apply in VBA, it's purging Word-specific "Symbols" and just using true Unicode values for em dashes and other typographical symbols.)

  • Why won't data merge allow more than one data source at a time?

    I need to number tickets, 8 up on a tabloid page, in InDesign (CS5)
    I have found out how to use data merge, but it won't allow me to select more than one data source at a time, therefore, making me use 800 sheets of paper instead of 100. That's not acceptable!! Is there a way to merge the pdfs if I make 8 different ones in the places they need to be? Each file that I export will have 100 pages, so is there a way to merge the files to put all eight tickets on each sheet, sequentially? This is driving me nuts!!!!!!!

    Past users have solved this frustrating problem. You can find their solutions with a Google search like "InDesign data merge multiple sequential items on one page" without quotes.
    Peter Gold
    KnowHow ProServices
    Frankie at Quad wrote:
    I need to number tickets, 8 up on a tabloid page, in InDesign (CS5)
    I have found out how to use data merge, but it won't allow me to select more than one data source at a time, therefore, making me use 800 sheets of paper instead of 100. That's not acceptable!! Is there a way to merge the pdfs if I make 8 different ones in the places they need to be? Each file that I export will have 100 pages, so is there a way to merge the files to put all eight tickets on each sheet, sequentially? This is driving me nuts!!!!!!!

  • Indesign CS3 Data Merge "Merge Records" Command. Help?

    I'm looking to automate the merging of a mountain of records. I have 587 tab-delimited text files with 40 records each. I want to process these via Data Merge using a single pre-designed template with built-in placeholders and variable data fields, including a variable barcode graphic. In the end, I want to create 704 multi-page, 6-up per page, indesign files with merged data, and 704 multi-page PDFs.
    Here's where I am at. Using a combination of AppleScript, TextWrangler and InDesign CS3, I am able to set up a loop where I can open the single template, save it to a new file with a new name, change its data source to the appropriate text file, and as a test, make a PDF of the template using the correct export preset. What I cannot seem to do is get the template to perform a "Create Merged Document...".
    In InDesign CS3's AppleScript dictionary there is a command called "Merge Records" under the Data Merge section. It appears to do exactly what I am after. But when I try to use it (and the good Lord knows I have tried numerous permutations), it only returns errors like "Adobe InDesign CS3 got an error: active document doesn't understand the merge records message."
    Anyone know what I am doing wrong? I have set up a separate AppleScript for testing purposes that opens up the template, saves it under a new name, and attempts a "merge records" command. Here it is. Maybe someone smart out there can tell me what I am doing wrong.
    set templatePath to "Welch_Jobs:0_JOBS:280019_Churchill:WPC FILES:Workup:280019_6up_master template.indt" as text -- the main template file that will be modified, saved with a new name, then merged with its data to create a new merge file
    set newTemppath to "Welch_Jobs:0_JOBS:280019_Churchill:WPC FILES:Workup:goody.indd" as text
    tell application "Adobe InDesign CS3"
    open file templatePath
    tell active document
    save to newTemppath
    merge records
    end tell
    end tell
    I have this feeling that this is a command that is actually unsupported. Google searches have been fruitless except for one poor soul who can't get it to work either. I have, however, seen that a similar JavaScript command exists called "DataMerge.mergeRecords". If it is impossible to do this via AppleScript, is it possible to make a JavaScript that will do it, and access the JavaScript with a "do script" command in the main AppleScript? If so, how would I accomplish this? What whould the JavaScript look like, and where do i need to put it?
    I would greatly appreciate any help you, dear reader, can give me on this.

    Well, did you look at the dictionary?:
    merge recordsv : Merges records and produces an optional overset report.
      merge records
    data merge
        output overset report file alias or
    text] : The path to the file in which to store the overset report.
    Note also that it's part of the Preferences Suite, not the Datamerge suite. Do you see differently?
    Anyhow, you're clearly not calling it with a data merge parameter.
    I also have a suspicion that it needs to not be inside a "tell active document" but it probably doesn't matter.
    But my AppleScript is rusty.

  • Data Merging Preview Error CS3

    I am attempting to merge the names and position of people into nametags through InDesign and Excel.
    The excel file seems to work fine.
    When I go through the steps to create a data merge I chose to preview the results before clicking ok.
         My setting use Multiple records so I wanted to make sure everything was in the right order.
    After I set the layout options and previewed I clicked ok and after a few minutes a new document was created with pages of the name tags and filled in information. However instead of using all of the different name and positions as it had shown in the preview it only repeated the same name and position for all 15 pages.
    My question is what steps can I take to makes sure all the names are used instead of getting 60 tags with the same name?

    I have done that with the same results.
    If it is helpful to note, it always chooses the 8th row and repeats that data. If I ask it only to insert specified rows and there are more than 8 it will take the 8th from that number. For example if I want it to insert rows 11-29 it will choose row 18 and repeat.

  • Printing Tab Sheets using Data Merge (DM)

    Given: Three "layers" of 5 cut Tab sheets that are to show different text items on the 15 tabs. (I have performed DM to print 5 cut tab sheets.)
    But how would you use DM to place and print the 3 unique sets of 5 cut tab sheets? How would the csv file be set up to reflect the repeating tab positions? I believe you can have up to 50 items layed out in a DM.
    I know how to actually print tabs, but I figured DM was more efficient.

    I'm not sure this will really work for data merge, but if it can be done with a single file you'll need to do some modifications to your data set.
    First, you'll need five different fields for the data, one for each tab, so for each record you'll have one field populated, and 4 blank (or just two commas next to each other, nothing between for each blank field). If you were working in Excel, this would mean you'd need to populate cells in a shift right AND shift down pattern, sort of stair-stepping.
    Next you'd need to make a five-page file in ID and put each filed in the correct position on it's own page. It might work to use five master pages, and put one field on each master, but I haven't had good luck using fields on the master page unless you are using a single record per page merge (which you are), and I never tried with multiple masters, so ...

Maybe you are looking for

  • Will this ViewSonic LCD Monitor work w/G4 MDD?

    I don't know enough about screen resolution to know whether this particular ViewSonic LCD monitor will work with my G4 MDD. The G4's video card has an ADC connector and a DVI connector. The monitor I'd like to get, which uses a DVI cable, is the View

  • Why does th  It is a QuickTime movie from a dvd home recording.

    Why does the audio stop after the movie starts?  It is a QuickTime movie on a dvd home recording.  Also, the video is choppy.

  • Fixing pageheight in report printing

    i am using report bulider 6 on win2000. I am unable to stop page eject after a 5.5 inch high page. Any source of program control in plsql, bulit in SRW modules or SQLJ will help. i am using LX-300 dot matrix printer. further in win98 it is easily han

  • Anyone know a TV software for mac?

    I want to buy a software/hardware that can allow me to watch tv on my mac, i live in mexico and would like to be able to watch the local channels on my mac so i can record them, is there any software/hardware that i can buy to be able to do that?

  • De-Authorization of devices on itunes

    Hey Guys.. Through the years of owning apple devices it has never accured to me to de-authorize them before selling. Now, this must be the MOST STUPIDEST CONCEPT!!! @APPLE!!!! I Still have 3 of my devices why would i want to make unnecessary work by