I finished writing the book in April and it has taken me until November to get it all edited and formatted and create the images and cover. I just did the Remove Leading Whitespace and Parenthetical White Space and did the changes manually and it worked awesome! I was able to rebuild the tables and everything is great now. I began to output the document several pages at a time and located two offending pages. It turns out that something corrupted one of my tables when I ran the GREP and clicked change all. I ran the Remove Trailing Whitespace GREP and after I did it, InDesign would no longer output to PDF. I have struggled with a number of these issues as I originally wrote the book in Word. I have been formatting a 400+ page book that I have written and I am sending it to the printer next week. This query also picks up the double returns and even multiple spaces (but only when the spaces are at the end of a paragraph) so I tend to run this one first.įor more information and a list of GREP characters, see InDesign Help / Find/Change. For long documents, this can be a real nightmare. When it’s just a single space, most of the time they don’t cause any problems, but sometimes they won’t fit on the same line as the punctuation and they force a new line or even a new page. Trailing whitespace refers to one or more spaces, tabs or extra returns at the end of a paragraph, between the final punctuation and the hard return(s). Another preset, this one pulls out all two or more hard returns and replaces with one. Hit Change All and poof! All extra spaces are gone. The Find What line looks a little scary, so just don’t look too closely. If you simply can’t look away, understand that it’s a string of GREP characters that looks for two or more spaces (i.e., em spaces, en spaces, flush spaces, hairspaces, etc.) and replaces all of those with one spacebar space. Instead of running a series of searches to weed out all extra spaces, just pick this one preset. Drop down the Query list on the top line and run each of these queries with the Search parameter set to Document (to search all the stories in the InDesign document):.Choose Type > Show Hidden Characters so that you can see the non-printing characters.(I place stories on the Pasteboard when I’m not ready to place them on the actual pages.) Place all your files into the InDesign document.The three I am going to show you are using GREP, which uses patterns instead of actual character strings to locate and fix issues in InDesign documents. You can quickly and (painlessly) remove extra spaces by running one or more Find/Change queries. Too many extra spaces in your InDesign documents? No problem. Posted on: December 9th, 2009 Author: barb.binder Category: Adobe InDesign By Barb Binder, Adobe Certified Instructor on InDesign Set fldMerge = (oRng, wdFieldMergeField, sFieldName, False)īFound = / Adobe InDesign / Adobe InDesign: Removing Unwanted Spaces, Fast! Adobe InDesign: Removing Unwanted Spaces, Fast! If wdNotAMergeDocument Thenįor Each mm In ĭebug.Print ReplaceTextWithMergeField(mm.NAME, rng) & " merge fields inserted for " & mm.NAMEįunction ReplaceTextWithMergeField(sFieldName As String, _ If the Range stays within the field, the merge field name inside it will be found again, and again, and again. To replace the found value with a null value, enter the. To replace the found value with an empty string, leave the Replace text box blank. In the Replace text box, type the new value. Type the value to find in the Find text box. The end-point of a merge field is still within the merge field, thus the line oRng.MoveStart wdCharacter, 2 is required after collapsing the Range. Click the Table menu and click Find and Replace to open the control in the table view. The tricky, or special, part of the Function is setting up the Range after a successful Find to continue the search. I've set the function up to return the number of times the field is inserted. Inserting the merge field is moved into the Function that searches the field names in the document. The solution for this combines the code for inserting all merge fields into a document with the basic code you found / recorded. I recorded this myself, but am not sure how to search and replace text with desired merge field. oRng, wdFieldMergeField, "Player_1", False I found this code here ( ) but it only will do one specified mail merge field at a time. Ideally, the macro would do this for all mail merge fields that exists at once.īelow is as far as I have come with formulating my desired code. For example, if there was a mail merge field named "project_date" and in the Word document there was the text "project_date" the macro would turn the text into the actual mail merge field "project_date". Once identified it would change the text in the document to the actual matching mail merge field name. I would like to create a macro in MS Word that when run searches the document for text that appears in the body of the document that matches the mail merge field name.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |