Skip to main content
PCreater
Known Participant
July 23, 2014
Answered

Find Text by Formatting and convert to outline

  • July 23, 2014
  • 1 reply
  • 1694 views

Hi! I need a script which find the text by formatting and convert to outline. If any one know who can make this script please provide.

Thanks

I need the script for specific formatting only for once. So I not need any fancy options or dialog boxes. I also made the character style for the formatting.

This topic has been closed for replies.
Correct answer Mike Bro

Hello @Rogerio5C09,

 

Some of the script's formatting was lost when ported over from the old site.

I also posted the corrected code under your new post here:

https://community.adobe.com/t5/indesign-discussions/old-topic-find-text-by-formatting-and-convert-to-outline/td-p/13298371

 

var doc = app.activeDocument;


app.findTextPreferences = null;


app.findTextPreferences.appliedCharacterStyle = "Pink Text";


var found = doc.findText();


for(var i =0;i<found.length;i++)


{


        found[i].createOutlines();


    }


app.findTextPreferences = null;

Regards,

Mike

1 reply

Chinnadk
Legend
July 23, 2014

Try this.

var doc = app.activeDocument;

app.findTextPreferences = null;

app.findTextPreferences.appliedCharacterStyle = "charstylename";

var found = doc.findText();

for(var i =0;i<found.length;i++)

{

        found.createOutlines();

    }

app.findTextPreferences = null;

Regards,

Chinna

Inspiring
October 26, 2022

Hi Chinna,

I know this is a very old topic, but this script is exactly what need! 🙂 Does it work with InDesign 2022 as well? I'm getting a "found.createOutlines is not a function" message when I try to run it on JavaScript.

Thanks in advance for checking.
Rogerio

Inspiring
October 26, 2022

Hello @Rogerio5C09,

 

Some of the script's formatting was lost when ported over from the old site.

I also posted the corrected code under your new post here:

https://community.adobe.com/t5/indesign-discussions/old-topic-find-text-by-formatting-and-convert-to-outline/td-p/13298371

 

var doc = app.activeDocument;


app.findTextPreferences = null;


app.findTextPreferences.appliedCharacterStyle = "Pink Text";


var found = doc.findText();


for(var i =0;i<found.length;i++)


{


        found[i].createOutlines();


    }


app.findTextPreferences = null;

Regards,

Mike


Thanks again, Mike! 🙂