Also, aint the solution. Still same error.
var style = app.documents[0].paragraphStyleGroups.itemByName( "Tabellen" ).
paragraphStyles.itemByName( "Tabel uitlijning" );
app.findTextPreferences = null;
app.findChangeTextOptions = null;
app.findTextPreferences.findWhat = '<0016>';
found = app.documents[0].findText();
for (i = 0; i < found.length; i++) {
found[i].tables[0].appliedParagraphStyle = style;
}
Sorry -- this line:
found[i].tables[0].appliedParagraphStyle = style
should be like this:
found[i].appliedParagraphStyle = style