Skip to main content
Participant
February 7, 2023
Question

Convert all live captions to static captions (Easy way)

  • February 7, 2023
  • 1 reply
  • 560 views

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 has been closed for replies.

1 reply

rob day
Community Expert
Community Expert
February 7, 2023

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();  
    };
}; 

 

Participant
February 22, 2023

Hi rob day!

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

 

 

rob day
Community Expert
Community Expert
February 22, 2023

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?