Copy link to clipboard
Copied
I'm trying to create a script to auto tag my paragraph styles.
I know how to call out specific styles and tag them with a specific tag (H, P, etc.) and even 'all others' with a different tag.
Is there a way to call out all of the styles in a specific folder?
With some changes that InDesign has made, list styles need to be tagged with [Automatic] ... How would i script to tag all files in 'Lists' folder to [Automatic]
thank you!
My bad, had only tested with ePub, not PDF.
Just remove all existing style maps instead:
var autoGroup = app.documents[0].paragraphStyleGroups.itemByName("Lists");
var styleTags = autoGroup.paragraphStyles.everyItem().styleExportTagMaps.everyItem().remove();
Copy link to clipboard
Copied
You want the ParagraphStylesGroup object. So:
var autoGroup = app.documents[0].paragraphStyleGroups.itemByName("Lists");
autoGroup.paragraphStyles.everyItem().styleExportTagMaps.everyItem().exportTag = "[Automatic]";
Copy link to clipboard
Copied
I recieved an error "Invalid tag for style mapping"
Copy link to clipboard
Copied
My bad, had only tested with ePub, not PDF.
Just remove all existing style maps instead:
var autoGroup = app.documents[0].paragraphStyleGroups.itemByName("Lists");
var styleTags = autoGroup.paragraphStyles.everyItem().styleExportTagMaps.everyItem().remove();
Copy link to clipboard
Copied
perfect! thank you!