QuarkXPress 4.11 deleting all style sheets

Can anyone help me delete all style sheets in a Quark Document? I found this nice little script that deletes the Paragraph Style Sheets, but it doesn’t touch the Character Style Sheets. If anyone knows how to script the deletion of Character Style Sheets, please help.

I’m using Mac OS 9.2.2 and Quark 4.11

Thanks,

David

Hi :slight_smile:
Here one solution for delete every Paragraph’s and Character’s Style Sheets:

--[Script Delete Style Sheets QXP]
tell application "QuarkXPress? 4.11"
	tell document 1
		if (count (name of every character spec whose index is not 1)) > 1 then ¬
			delete (every character spec whose index is not 1)
		if (count (name of every paragraph spec whose index is not 1)) > 1 then ¬
			delete (every paragraph spec whose index is not 1)
	end tell
end tell
--[/Script]

Enjoy :wink:

Fredo d;o)

That worked great. I had to change “paragraph spec” to “style spec” in order to get it to compile. There must have been a syntax shift at some point with Quark. Thanks for putting me on the right track.

David