10 Replies Latest reply on Nov 17, 2011 5:49 PM by Colin Flashman

    Data Merge - Is it possible to set colors?

    ccbrange

      I am working on a bunch of certificates where the client wants the colors to be able to change so they are not the same from certificate to certificate.  Is that possible using a field in data merge?  If so, how would I do that?

        • 1. Re: Data Merge - Is it possible to set colors?
          Jeffrey_Smith Most Valuable Participant

          What part of the certificate will change color (i.e. type, background) ? The background could be handled as an image. You would have to do a number of things like: create the various colors > save as graphics. Establish the path of each graphic background on your system, this info is necessary for merging graphics. Then add this info to the source data. Add a picture placeholder in your master Indesign document. A little work involved, but it can be done.

          • 2. Re: Data Merge - Is it possible to set colors?
            ccbrange Level 1

            This would be the color of the text as well as possibly the stroke color of the text.

            • 3. Re: Data Merge - Is it possible to set colors?
              Colin Flashman Adobe Community Professional

              Possibly with GREP styles, but very limited as to what can change.

               

              rather than explain it here (it's complicated) i've posted a link to a PDF which has an indesign file plus links. the PDF hopefully demonstrates what the OP wants to do, and the attached files within the PDF are what was used to make it. within the indesign file, have a look at the paragraph style which was made and look at the section "GREP styles".

               

              http://colecandoo.files.wordpress.com/2011/11/changename.pdf

               

              otherwise if it is a background which has to change, then i completely agree with jeffrey_smith's suggestion.

              • 4. Re: Data Merge - Is it possible to set colors?
                W. Bravenboer Level 1

                A possibility could be to use a kind of 'joker' glyph, first you put an otherwise not used character (like #) in front of the name of the person you want to have different colors and such.

                Then you create styles in Indesign with the necessary settings. After merging the text you can use the Find and Replace function to remove the unneeded characters and set the wanted style.

                 

                So for instance:

                #Charlie - 'RedText Style' - Charlie

                &Bravo - 'BlueText Style - Bravo

                • 5. Re: Data Merge - Is it possible to set colors?
                  ccbrange Level 1

                  I saw the PDF which had a great example of the final product but didn't see the thing on how to do it...

                   

                  It's very much the character style and such, along with a background color, though I'm thinking I could just add another field and instead of having it as a box made in InDesign I could just have a box in AI that I import along with my other files.

                  • 6. Re: Data Merge - Is it possible to set colors?
                    ccbrange Level 1

                    If you were to set it up with GREP styles, wouldn't the removing of the 'joker' glyph negate having the styles in the first place?  As long as it had the 'joker' glyph it would format it correctly, but as soon as I deleted it, the style would revert, unless I'm missing something.

                     

                    Is it possible to just have another field that you could do an 'if' statement somewhere?  I saw something somewhere about scripting but in all honesty, that looked more complicated than I can go and still get everything out by deadline.

                    • 7. Re: Data Merge - Is it possible to set colors?
                      W. Bravenboer Level 1

                      I must confess I have no experience using GREP styles. The reason I use a 'joker' character is to make it possible for the 'Find and replace' function to change the style.

                      If you type in the 'find' menu the 'joker' (like #) and leave the 'replace' field blank, it removes the 'joker'. The style stays intact, I use a Paragraph style, so the complete sentence changes.

                       

                      So find all instances of '#' and change the style to 'RedText' and remove the '#'.

                      No scripting necessary. I don't doubt it could be done using GREP, but I find it not very user-friendly...

                      • 8. Re: Data Merge - Is it possible to set colors?
                        Jeffrey_Smith Most Valuable Participant

                        Here's how you can do a GREP style using the joker characters from W.Bravenboer's example [#Charlie &Bravo]

                         

                        You would create a paragraph style that has a small font size and character color of none.

                         

                        Then you would create various character styles, with the various colors and fonts styles that you want

                         

                        Next, in the paragraph style you would create the multiple GREP styles - for finding instances of #, the grep would look like this (?<=#).+

                        and apply the character style you want. Continue for all the variations.

                         

                        So the end style would apply varying character styles to text based on each joker character, leaving joker intact, but making it invisible.

                        • 9. Re: Data Merge - Is it possible to set colors?
                          Jeffrey_Smith Most Valuable Participant

                          Here is a screen capture, note: there is a # and 1 placed before each of the entries of name, which is applied the same paragraph style

                           

                          grep.jpg

                          • 10. Re: Data Merge - Is it possible to set colors?
                            Colin Flashman Adobe Community Professional

                            @ccbrange

                             

                            in the PDF from my blog, there should be a little paperclip in the left hand side of the screen. i've taken a screengrab.

                             

                            Picture 1.png

                            and there are the files required.

                             

                            in short, don't need to use a hash tag or delimiter. use this grep:

                             

                            ^[a|c|e|h].+

                             

                            this will select the start of the line and then any words starting with either a, c, e or h until the end of the line.

                             

                            have a look at the attachments and see what i've done.