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

Can I create contractions throughout a document? (e.g., It is --> It's)

New Here ,
Sep 04, 2014 Sep 04, 2014

My company recently updated it's style guidelines. Previously, we couldn't use contractions, but now we are. So when I update our documents, I have to go through and change "It is" to "It's", "you are" to you're" and "We are" to "We're", etc, etc.

Is there a script to make this easier? It is really tedious right now.

I've been using find/replace which helps somewhat. But is it possible to script something that would make it even easier?

TOPICS
Scripting
496
Translate
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 ,
Sep 04, 2014 Sep 04, 2014

Use the FindChangeByList script from the Sample Scripts folder. Its (not "it's") syntax is described in the sample txt document. Make sure you are using tabs to separate the items, though, as a common mistake is to use regular spaces.

Translate
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 ,
Sep 04, 2014 Sep 04, 2014

OH thank you! I think this is exactly what I need.

However, I get an error -2741 when I run the script. Any ideas what I'm doing wrong?

Here's what I created (simple one line for now):

text{find what:”You are”}{change to:”You’re”}{include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}Find all You are and replace with You’re.
Translate
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 ,
Sep 04, 2014 Sep 04, 2014

Ah! I found the error! My text editor wants to replace the dumb quotes with smart quotes. When I disable that in preferences, and use dumb quotes, then the script works like a charm!

Translate
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 ,
Jul 04, 2024 Jul 04, 2024

@wayne.west - This isn't working for me 😕 I don't get an error -2741 but it just doesn't replace the words I want it to. Can you please share a screenshot of the code you're using?

Translate
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 ,
Jul 05, 2024 Jul 05, 2024

You've revived a ten-year-old topic, here. WW hasn't posted since then and, er, Jongware has left this plane of existence.

 

This is another area where a few well-formed Find/Replace operations, perhaps using GREP, might serve just as well as a script.

 

ETA: The longer I think about it, the less such a wholesale conversion of a language element makes sense, even in bureaucratic boilerplate. (1) Why bother and (2) not every instance is going to read well without editorial review.

Translate
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 ,
Jul 06, 2024 Jul 06, 2024
LATEST

As noted, this is a ten year old discussion. I am locking it to avoid any future confusion. If you need help, please start a new discussion with full details.

Translate
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