Skip to main content
Participant
Feb 7, 2023 11:17 AM UTC
Question

Convert all live captions to static captions (Easy way)

Help!

 I'm book editor.

I have been seen different answers. People, you're amazing. 

But im of a lower level of ID. Can anyone explain me where I have to write the formula to convert all the caption of the same document to static captions?

Thank you all!

 

app.documents[0].textVariables.everyItem().convertToText();

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

rob day
Community Expert
Community Expert
Feb 7, 2023 12:49 PM UTC

Hi @Nuria28295192ksa4 , For existing captions,  I think you will have to invoke the Convert To Static Caption menu item. Try this:

 

var tf = app.activeDocument.pages.everyItem().textFrames.everyItem().getElements()
var mi =  app.menuActions.itemByID(132655)
for (var i = 0; i < tf.length; i++){
    app.select(tf[i])
    if(mi.enabled){  
        mi.invoke();  
    };
}; 

 

Translate
Participant
Feb 22, 2023 10:47 AM UTC

Hi rob day!

I can't save the action. It said sintaxys error. 

 

 

Translate
rob day
Community Expert
Community Expert
Feb 22, 2023 12:13 PM UTC

Are you saving the code in a plain text editor with the .jsx extension, moving the file into your InDesign Scripts folder, and running from the Scripts panel?

 

Applications⁩ ▸ ⁨Adobe InDesign 20XX⁩ ▸ ⁨Scripts⁩ ▸ ⁨Scripts Panel⁩

 

Can you show a screen capture of the error?

Translate