Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Converting local formatting to character styles with a script

From: Using Word and InDesign Together

Video: Converting local formatting to character styles with a script

When you're confronted with a Word document that has lots of local overrides, the one thing you want to do is to save the local overrides that you want by converting them to character styles. And then, that way it's a lot easier to get rid of the overrides that you don't want with all sorts of different methods in InDesign. In a previous video in this chapter, I showed how to do that manually with Fine Change. Now I want to show you a couple scripts that will help, and these scripts are free! Yay! I'm including, some of them in the, exercise files, and I'll show you, a webpage where you can download them as well, if you don't have the exercise files.

Converting local formatting to character styles with a script

When you're confronted with a Word document that has lots of local overrides, the one thing you want to do is to save the local overrides that you want by converting them to character styles. And then, that way it's a lot easier to get rid of the overrides that you don't want with all sorts of different methods in InDesign. In a previous video in this chapter, I showed how to do that manually with Fine Change. Now I want to show you a couple scripts that will help, and these scripts are free! Yay! I'm including, some of them in the, exercise files, and I'll show you, a webpage where you can download them as well, if you don't have the exercise files.

Here is our Word document, you can see that everything is done in Normal. With overrides. And if I turn on Show Direct Formatting Guides, oh my goodness, look at all that, overrides. Let's jump to InDesign, where we have a waiting document with some paragraph, styles, and some character styles, and will flow in this document. So, I go to File place, go down to the document that we want, is the one that is normal, normal meaning normal formatting, normal style.

We want to remove the styles and formatting but preserve the local overrides. But unfortunately, in this case, that means all sorts of overrides, like type size differences and font differences. Now, let's look at the script that I wanted to use and you can find your scripts by going to the Window menu, going down to Utilities and choosing Scripts. Earlier versions of InDesign, have that under the Automation file menu toward the top. And the scripts I'm going to show you, I'm in CC. As far as I know they work from CS4 or 5 all the way to CC.

I didn't write these scripts, I got them elsewhere with their free, and the ones that I'm looking at are preptext, and then a couple called PerfectPrepText and one called ShowTextOverrides. The one that you use for an instance like this, where you have text that you have not yet styled in InDesign, or that has no paragraph styles that you want to retain. It's all normal. The one script that you run is called preptext. And this has been around for a few years. It was written by John Weir/g. And all it does is it goes through the document and it finds everything that's bold, italic, bold italic, superscript and so on and it creates character styles for you and it applies them, yes! Let me make this larger so you can see what's about to happen and we'll click inside here and double click preptext the end.

Is that fast or what? See up here, this has bold character style applied to it, and this has the italic character style applied to it. Notice that it ignored the existing italic character style. If there were one that had a capital I, it would have used that one. It created one for bold italic, it created, look at this! It created one for bold, underline plus small caps. Now it did not include the color. It just left the color as is. If you take a look under character color, it doesn't specify a color, which is interesting.

It just specifies, the case. But it also, I had a little guy right here, here it is. I have a little superscript, it made one for the superscript as well. Now what you can do is click in any paragraph and if I just click Body, you see that we have some other local formatting that we don't want, but we can easily just Option or Alt+click on body style and it will get rid of all the local overrides but keep our character styles. Yay! So you can do this to the whole document. No more fine changing just use preptext. Now, what about the other one? Let me, Revert. And talk about one you'd want to use PerfectPrepText.

I'm going to, show you this other document that I have, it is the same content except that somebody has gone to the trouble of applying Styles. So we have body text, we have heading two, and so on. The problem with preptext is that it's meant to be run on un-styled text. It will sometimes do too good of a job with styled text, and will apply character styles, on top of, paragraph styles, that are unnecessary. So, in that case, let's go ahead and, flow the, styles text. We'll click Open, and this time you want to Preserve Styles and Formatting.

And Shift > Click, to pour it all in. And see, if we ran preptext here, and by the way, before you run any of these scripts, you should always save. That way, if something goes blooey, you can revert back to it. 'Cuz some of these scripts, especially the free ones, they do like 300 steps, and in order to undo, you'd have to undo each of those 300 steps. So, let's go ahead and do that, I'm going to do a Save As to this document. And we'll call it "2". Watch what happens when I double-click "preptext". Oop, I didn't have an insertion point, so I have to click inside here and then double-click, there we go. So it did create character styles, small caps and super, but look at this paragraph style, it also applied a character style called "Bold". Right, so we don't want Heading 2 plus a character style, that's kind of crazy. It's not really meant for this, it'll do the job but it might bite you in the end, let's put it that way.

So I'm going to Revert. Okay. And now this time instead of running, (INAUDIBLE) we don't have the character style applied. But what we do want to do is we want to create character styles for things like, me walk, up here and that's when we use this other script written by a friend of mine named Peter Carl, called PerfectPrepText. There is one called Do and one called Ask. I can show you a webpage that explains the difference but essentially, just use the one that says Do. So click inside the text frame. Double-click the one that says Do. The end. But basically, if you were watching it tore it apart, removing all of the styles. Created and applied the character styles it needed to and then put the paragraph styles back.

And what's nice is that it didn't apply the bold character style to this heading because it was already bold. That's whats so perfect about PerfectPrepText. I explain the differences between these in my InDesign secrets post from last year called; PerfectPrepText: a smart way to style local formatting and explain the difference and have download links for you. And if you don't know how to install scripts our website at www.InDesignsecrets.com will also tell you. By the way, I have this one other script that's wonderful called; Show Text Overrides, and I've already installed it and watch what it does.

Let me Revert. You don't want to undo. And if I go to the Type menu, you see it added a menu item called Show Text Override. And if I select it, it's really great. It goes through the document and it puts this non-printing highlighting on everything that it overridden. So it's an easy way for you to check to see if you've gotten all of the direct formatting and replace them with character styles, a nice little clean up thing. That is a free script that I've downloaded, I can't really distribute it, from a friend of mine named Harbz /g, who runs a company called "in-tools.com," and if you go to in-tools.com, just look for "Scripts".

And he's got one called Showing Text Formatting Overrides with a download link and that also works in earlier versions of InDesign as well as CC. So when you're confronted with either a very messy Word document with lots of local overrides or one that's perfectly styled, but you still want to apply character styles to the local overrides. Be sure to check out and work with these wonderful scripts, and they're free!

Show transcript

This video is part of

Image for Using Word and InDesign Together
Using Word and InDesign Together

41 video lessons · 8191 viewers

Anne-Marie Concepción
Author

 
Expand all | Collapse all
  1. 2m 5s
    1. Welcome
      1m 3s
    2. Using the exercise files
      1m 2s
  2. 18m 27s
    1. Discovering how text styles work in Word
      7m 12s
    2. Understanding the basics of InDesign text styles (for Word users)
      4m 42s
    3. Identifying which formatting attributes transfer and which don't
      6m 33s
  3. 46m 52s
    1. Cleaning up text formatting in Word
      6m 36s
    2. Checking paragraph and character defaults in InDesign
      3m 57s
    3. Controlling text formatting when cutting and pasting
      3m 54s
    4. An overview of placing (importing) Word files into InDesign
      3m 31s
    5. Stripping out Word styles when importing text
      4m 31s
    6. Preserving Word styles when importing text
      6m 25s
    7. Mapping Word styles to InDesign styles
      5m 40s
    8. Creating a Word template with InDesign styles
      6m 30s
    9. Linking to Word files for automatic updating
      5m 48s
  4. 37m 32s
    1. Importing Word tables of contents (TOCs)
      4m 25s
    2. Converting a Word index into an InDesign one
      5m 12s
    3. Working with footnotes
      3m 57s
    4. Converting static endnotes into dynamic endnotes
      7m 2s
    5. Managing inline images and photos
      4m 54s
    6. Working with page breaks
      6m 35s
    7. Working with tracked changes
      5m 27s
  5. 1h 6m
    1. Removing extra returns, tabs, spaces, and other deadwood
      7m 18s
    2. Converting tagged Word docs to styled InDesign text with Find Change
      4m 53s
    3. Converting tagged Word docs to styled InDesign text with a script
      5m 35s
    4. Replacing Word styles with InDesign ones after importing
      5m 27s
    5. Diagnosing and fixing bizarrely formatted text
      5m 18s
    6. Deleting Word hyperlinks and or their formatting
      7m 12s
    7. Fixing missing glyphs (empty squares pink highlighting)
      4m 35s
    8. Converting local formatting to character styles with Find/Change
      5m 39s
    9. Converting local formatting to character styles with a script
      7m 18s
    10. Merging text from inline text frames in Word into the main text flow
      6m 2s
    11. Extracting embedded art from a Word file
      7m 22s
  6. 15m 30s
    1. Maggying the Word file to remove internal corruption
      4m 35s
    2. Round-tripping to InDesign RTF to clean up unnecessary information
      3m 43s
    3. Using the Divide and Conquer method in either program
      5m 8s
    4. Rescuing the text from a damaged Word file
      2m 4s
  7. 20m 11s
    1. Linking to Word files with the WordsFlow plugin
      3m 35s
    2. Syncing Google Docs with InDesign via the DocsFlow plugin
      4m 38s
    3. Converting Word docs to InCopy for fast and accurate formatting
      5m 47s
    4. Collaborating with an InDesign-InCopy workflow
      6m 11s
  8. 2m 50s
    1. Resources for Word and InDesign help
      2m 50s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Using Word and InDesign Together.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.