• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
14

Document disclaimer update chaos

Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Hi everyone! Long shot, but is there a way build dynamic function/fields into InDesign or some other magical Adobe space so that text can be updated in one spot but populate all files tied to it? We have built all of our collateral with a parent/master template (InDesign files) so if we update a disclaimer on that it does update once you open corresponding InD docs. That great but still becomes manual. I feel like I'm missing something in Bridge or some space where a disclaimer update can be much more automated.  Thanks for any insights!

TOPICS
Experiment , Feature request , How to , Import and export , InCopy workflow , Scripting , Sync and storage

Views

696

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

This InDesign Help file on linked content is what InDesign has available for linked content:

 

https://helpx.adobe.com/indesign/using/linked-content.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Thanks Steve. This is definitely helpful information and we can test this further. If you know of additional, robust automation features, do let me know please!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

I can think of quite a few ways to do this. My personal favorite is to have a single InDesign document that has the disclaimer in it, which you then place into your other InDesign documents. This is, I suppose, technically still "manual" insofar as you'd need the preference setting to update links on open turned on. That way, if the disclaimer INDD was changed, you'd get this dialog whenever you opened another INDD that had the disclaimer placed within it:

 

links.png

 

Is this... too manual? It sounds pretty close to what you already have set up, I suspect. I personally don't think it's a good idea to have such template text update silently, but that's a workflow preference of my own that you might not share.  It's possible to have a script run every time a document is opened; I bet that there are a few ways one could set that up to silently update some kind of content. I have some JS (and some Applescript) in my unfinished-script-experiments folder that are clearly experiments towards this kind of silent-update-on-open with content stored in XML.  Seems like a heavyweight solution in comparison to clicking on "Update Modified Links" upon opening a file, but in someone else's workflow it might be an important feature. 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Thank you, Joel. Yes, that is our current testing solution and I appreciate your thoughts. While I normally classify myself as a 'control enthusiast' and the thought of silent script updates sounds like true chaos, we are managing nearly thousand pieces of collateral now and the library continues to grow. We are required to have the corporate disclaimer on at least one page of each brochure/fact sheet/template and we've acquired some services that required two leagl updates to the disclaimer - this year alone. We have a small creative team and I'm trying every solution to help my team for the next update request. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

*legal updates 
Please excuse my typos! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Many good answers, but also consider placing a linked PDF, as something that can be easily changed but with a more controlled extra step,  over a placed INDD.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Thanks. Can you clarify this a bit further?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Create the disclaimer in ID and export to PDF, ideally with a page size of how large you want or need it to be (e.g. 6x2 inches or whatever). Place (link) that PDF in the live docs. Any update to the PDF will automatically update in the docs, but is protected against accidental or unwanted changes. 


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

You can place an indesign file in an indesign file, or a cloud asset, as long as the file is available it will update (or ask to be updated) when you open the file with the link. (You can also place a linked text, xml and/or insert HTML code, but I think CC Library Asset is the simplest if available to you)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Thank you!

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Hi @Sarah33611737dz2d, you've got a lot of excellent correct advice here already but, from what you say, I think you are already handling things very well, and your problem is actually how do I update hundreds of indesign documents without manually opening each one? 

 

If that is your problem, I've written two scripts that should help anyone in your situation. The idea is that you keep a text file which stores the paths of all the documents which contain a link to the disclaimer and, whenever the disclaimer is edited, you run the second script below and it automatically does the updating. The two scripts are:

 

1. "Add Open Documents To List File.js" — This is a helper script that adds the paths of every open document to a text file called "documents to open.txt" saved in the same folder as the script file. To use it, open your documents that have the disclaimer link in them and run the script. Note: you don't have to do these all at once—you can add them piecemeal if you prefer. Also note that the script will always add the document paths to the file—even if they are already in it. You can freely edit this text file if it gets messed up. Just keep one path per line.

 

2. "Open And Update Listed Documents.js" — this is the script you will use whenever your disclaimer is changed. It opens every document in the text file, one-by-one, and updates, saves and closes each, and it will tell you what it completed at the end.

 

Put these two scripts in the same folder, as they read/write to the same text file. The script listings are below. If you end up trying them, let me know how it goes!

- Mark

 

Script 1:

/**
 * @file Add Open Documents To List File.js
 * Add all open documents to "documents to open.txt" file,
 * for later use with "Open and Update Listed Documents.js" script.
 * @author m1b
 * @discussion https://community.adobe.com/t5/indesign-discussions/document-disclaimer-update-chaos/m-p/14234094
 */
(function () {

    var docs = app.documents,
        fileName = 'documents to open.txt',
        dataFile = File(File($.fileName).parent + '/' + fileName),
        documentList = getLinesFromFile(dataFile, ''),
        counter = 0;

    docLoop:
    for (var d = 0; d < docs.length; d++) {

        documentList.push(String(docs[d].fullName));
        counter++;

    }

    try {
        // write the list back to file
        dataFile.open('w');
        dataFile.write(documentList.join('\n'));
    }
    catch (error) {
        alert('Failed to write to "' + fileName + '". (' + error + ')');
    }
    finally {
        dataFile.close();
    }

    alert('Added ' + counter + ' documents to "' + fileName + '".');

    dataFile.execute();

})();



/**
 * Returns list of every line of a given text file.
 * @author m1b
 * @version 2023-11-15
 * @param {File} f - the file to open/create.
 * @param {String} emptyFileMessage - instructions added to newly created file.
 * @returns {Array<String>}
 */
function getLinesFromFile(f, emptyFileMessage) {

    var data = [];

    try {

        if (f == undefined)
            return;

        if (!f.exists) {
            // create empty data file
            f.open('w');
            f.write(emptyFileMessage);
            f.execute();
            return [];
        }

        // read contents and split into lines
        f.open('r');
        data = f.read().split('\n');

    } catch (error) {
        alert('Failed to open "' + decodeURI(f.name) + '". (' + error + ')');
        return [];
    }

    finally { f.close() }

    return data;

};

 

Script 2:

/**
 * @file Open And Update Listed Documents.js
 * Open all documents whose path is listed in
 * "documents to open.txt" file, then update links,
 * and save and close document.
 * @author m1b
 * @discussion https://community.adobe.com/t5/indesign-discussions/document-disclaimer-update-chaos/m-p/14234094
 */
(function () {

    var uilevel = app.scriptPreferences.userInteractionLevel;
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT

    var fileName = 'documents to open.txt',
        dataFile = File(File($.fileName).parent + '/' + fileName),
        documentList = getLinesFromFile(dataFile, 'Remove this line and add document file paths here, one per line.'),
        messages = [],
        docCounter = 0,
        linkCounter = 0;

    docLoop:
    for (var d = 0; d < documentList.length; d++) {

        if (
            documentList[d] == undefined
            || documentList[d] == ''
        )
            continue docLoop;

        var f = File(documentList[d]);

        if (!f.exists)
            messages.push('Document on line ' + d + ' does not exist. (' + decodeURI(f) + ')');

        var doc = app.open(f),
            links = doc.links,
            closeDoc = true;

        // find missing links
        linkLoop:
        for (var l = 0; l < links.length; l++) {

            if (links[l].status === LinkStatus.LINK_OUT_OF_DATE) {
                links[l].update();
                linkCounter++;
            }

            else if (links[l].status === LinkStatus.LINK_MISSING)
                closeDoc = false;

        }

        if (closeDoc) {
            doc.close(SaveOptions.YES);
            docCounter++;
        }

    }


    // messages.push('Added ' + counter + ' documents to "' + fileName + '".');
    messages.push('Updated ' + linkCounter + ' links in ' + docCounter + ' documents.');

    app.scriptPreferences.userInteractionLevel = uilevel;
    alert(messages.join('\n'));

})();


/**
 * Returns list of every line of a given text file.
 * @author m1b
 * @version 2023-11-15
 * @param {File} f - the file to open/create.
 * @param {String} emptyFileMessage - instructions added to newly created file.
 * @returns {Array<String>}
 */
function getLinesFromFile(f, emptyFileMessage) {

    var data = [];

    try {

        if (f == undefined)
            return;

        if (!f.exists) {
            // create empty data file
            f.open('w');
            f.write(emptyFileMessage);
            f.execute();
            return [];
        }

        // read contents and split into lines
        f.open('r');
        data = f.read().split('\n');
    }
    catch (error) {
        alert('Failed to open "' + decodeURI(f.name) + '". (' + error + ')');
        return [];
    }
    finally {
        f.close();
    }

    return data;

};

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Honestly, I like this solution a lot better than the solution I was cooking up (tag up the disclaimer for XML import, store an XML file with the disclaimer in a universally accessible location, then go around and install a script on everyone's workstation that would run on opening any INDD, look for the XML file, look for the disclaimer, and if the disclaimer is present, update tagged content). 

 

The main reason I like Mark's solution better: there's no step that says "Late at night, when there's no one in the office, creep around to everyone's machine and install this script."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Hey Joel, your idea is really clever, and would be excellent in the right situation. I imagine if the disclaimer was a company-wide asset that was updated frequently, on basically every document ever created in the company, this could be great. Additionally, the script could void the document somehow (by adding a watermark or other warning) every time the document was saved, so that the script would have to un-void it (at the same time as updating disclaimer or whatever) on opening which would ensure the update happened. This would be an attempt to handle situations where someone opens the document on a machine without the startup script—the document would be void. Who knows how well that would work in the real world though.

 

A possible downside would be that when an Indesign upgrade occurs (eg. 2023 -> 2024), the startup script would have to be placed in the app folder again. More late night sneaking!

 

My idea is probably more tied to the disclaimer update event, so that the person who updates the disclaimer also updates all the documents that use it, and then the disclaimer update is done and over with.

 

Always cool thinking about possible options.

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Wow, and thank you. This is the problem we have and I cannot wait to test this idea!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Sorry Joel! That was meant for Mark's comment. 

 

However, I actually love the idea of sneaking around everyone's machine late night to install the script. Mainly because we are all in very different places and I love to travel. But alas, this solution is so awesome that I'll have to accept my defeat on that. LOL 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

No apologies necessary! 

 

My idea works great at the scale of one small office where you'd only need one night to do everyone's computers.  It also works great at the planet-spanning corporate scale, where you just get the IT department to install it behind the scenes and you don't have to lift a finger. It doesn't work that well in between, unless you really want to accumulate a bunch of frequent flyer miles, right? 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

You're welcome @Sarah33611737dz2d! Please let us know how it goes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Thank you! This is amazing!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2023 Dec 01, 2023

Copy link to clipboard

Copied

Hi, Mark! I work with Sarah and I have installed the scripts you shared on my local machine, however I have a question if you  don't mind humoring me. It appears as if the scripts you shared are dependant on the disclaimer text being a linked file, not simple text that livers directly within a document. Am I correct? (Such as an external Word file Placed within InDesign.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2023 Dec 01, 2023

Copy link to clipboard

Copied

Hi @aaronajds_21, they only work with links. The scripts are to speed up the following manual process.

You've edited the *master* disclaimer text file (or graphic—it doesn't matter what kind of file)

Step 1: Open all the documents that have the disclaimer linked.

Step 2: Update modified content (in links panel) in all document.

Step 3: Save all documents.

 

Therefore if the disclaimer file isn't *linked* there is nothing in the links panel to update and these scripts are useless. If there are some disclaimers using the link and others are not linked, I would hope you are able to fix them so they are all linked. Have I understood you right?

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2023 Dec 01, 2023

Copy link to clipboard

Copied

LATEST

If you really want your master disclaimer to reside in a Word file, then you can check the box to "Create Links when Placing Text or Spreadsheet Files" which is in your Preferences in the File Handling section. That way, when that Word file changes, Mark's script would silently update that link as well. Of course, that would only work in your library of documents if you went in and changed the preference and re-placed the Word file. (The preference change can be automated by script as well!) 

 

If you're really asking for a script to automatically silently update some live text in InDesign - for Mark's script to automatically run a Find/Change query on the text of all of your files, replacing the old disclaimer with the new, instead of a links update - then his script would need to be revised, and I'd personally argue against that revision.

 

If it's a disclaimer, then a failure to update it might lead to some kind of legal trouble, no? And if it's just plain vanilla live text in hundreds of InDesign files that are worked upon by multiple people, isn't there a chance that someone may have added a soft return or something like that at some point? Something that would ordinarily flag for you as a human operator if you were revising it by hand, but that would lead to a failed Find/Change operation that would go unnoticed if you were silently mass-updating hundreds of files with no possibility of an error message? 

 

I think this thread covers all the possible good options. Linked INDDs, linked PDFs, XML, CC Library asset (not many keys tapped so far in favor of @Lukas Engqvist's suggestion in this thread, but it's a very good one that also requires zero late-night sneaking), and finally linked Word files. If you're looking at changing your workflow, change it in one of those ways; they're all safer & better managed than a silent unmonitored Find/Change operation on live text in hundreds of files. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines