10 Replies Latest reply on Aug 18, 2014 10:43 AM by Jeffrey_Smith

    Data Merge


      Is it possible to change font size mid sentence in data merge?

        • 1. Re: Data Merge
          MW Design Level 5

          No. You would need ID tagged text (or XML) output from your source in order to have attributes in the data come into ID.



          • 2. Re: Data Merge
            mikepember Level 1

            Thanks. Excuse my lack of knowledge, but I assume I can add that code in Excel?

            • 3. Re: Data Merge
              Jeffrey_Smith Most Valuable Participant

              That depends on the usage of text that you are merging and best to show an example. Merged text is no different than ordinary text, and can have nested styles or GREP styles to modify font size of words or characters that are within a sentence.

              • 4. Re: Data Merge
                mikepember Level 1

                Thanks Jeffrey. I am not familiar with GREP styles, excuse my ignorance. Are they simple enough to get to grips with?

                • 5. Re: Re: Data Merge
                  Jeffrey_Smith Most Valuable Participant

                  The basic premise of GREP is easy, it is a command-line search of text, looking for a matching expression, and replace with desired condition.

                  GREP is a function used in Find/Change searches, and can be implemented within styles. Having a good understanding of paragraph styles and character styles makes this usage of GREP easier to grasp.

                  The difficult part of using GREP (IMO) are the expression used to define searches. But, there are many sources available (including this forum) for constructing useful searches.

                  On a scale of easy to advanced, I would rate Indesign GREP usage on the advanced side.


                  Here is a simple example of using GREP:

                  Your text in data source file: Sale $25.00

                  And how it can be automatically formatted using GREP:  SALE $25.00

                  • 6. Re: Data Merge
                    MW Design Level 5

                    I took the original question to be formatting at import, not post-import.


                    Jeffrey, is there a means of changing text size/attributes at import for text that resides within a single cell? If there is, that would be something new to me that I would be grateful to learn.

                    • 7. Re: Data Merge
                      mikepember Level 1

                      Thanks to everyone for their help. I foresee a few late nights scratching my head whilst I get this one sorted.

                      • 8. Re: Re: Data Merge
                        SJRiegel Adobe Community Professional & MVP


                        Jeffery's example is set up pre-import. He mentioned that is was done with GREP styles. They are set up within the paragraph style - no post-import styling required.


                        SALE $25.00

                        The same could be done with nested styles if the text order is consistant.

                        • 9. Re: Data Merge
                          MW Design Level 5



                          Yes, I know. And it works *if* there is a "same pattern" to the data that needs, in this case, made bigger. Other than the example given, that of prices, there are few times I have ever performed merges where that is true.


                          With XML (and obviously tagged text), it is a matter of the tags being present in the data if what needs to be made larger is not in its own cell. For instance...in this example, there is a tag in the XML for using a character style. <cBigger> is the tag. Here I also changed the font to something obvious.



                          • 10. Re: Re: Data Merge
                            Jeffrey_Smith Most Valuable Participant

                            MW, my suggestion to mikepember is prefaced with "depends on the usage of text" and without ever seeing the actual text he is merging, my suggestion may be irrelevant. And you are right, there needs to be some kind of pattern in the text for nested or GREP styles to work, it just can't arbitrarily style text.