It's not my coding style.
But remove the semicolons
here:
for (i=1; i<myDoc.paragraphStyles.length; i++);
and here:
if (myPstyle.name=="H1");
It's not my coding style.
But remove the semicolons
here:
for (i=1; i<myDoc.paragraphStyles.length; i++);
and here:
if (myPstyle.name=="H1");