Sorry, I dshould have made it more clear, but I wanted it to apply to the active page.
I ended up getting it to work though:
var a = app.activeWindow.activePage.allPageItems, | |
t; | |
while( t=a.pop() ) | |
{ | |
if( !(t instanceof TextFrame) ) continue; | |
try{ t.createOutlines(true) } catch(_){} | |
} |