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

PCreater
PCreaterAuthor
Known Participant
July 23, 2014

It;s not finding the characterstyle kindly see the screenshot for error

Chinnadk
Legend
July 23, 2014

Check spelling of the character style name in the indesign, it is a case sensitive so the character style should be Word.