🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
2 messages
2 total messages Started by LarsThoren Tue, 31 Mar 2009 07:58
getting an objectStyle that is in a format group
#171
Author: LarsThoren
Date: Tue, 31 Mar 2009 07:58
5 lines
1000 bytes
I have a script that is working with object styles. I grouped my styles and can't find out how to access them within the group. I tried with groupname.Stylename as I thought that would have been logical but doesn't work. Would appreciate any input on this, thanks.

var myObjectStyle_CategoryTableCorner = myDoc.objectStyles.item("CategoryPage.CategoryTableCorner");

item.parent.applyObjectStyle(myObjectStyle_CategoryTableCorner, false, false);
Re: getting an objectStyle that is in a format group
#172
Author: LarsThoren
Date: Tue, 31 Mar 2009 08:18
13 lines
1042 bytes
I found some help in the scripting reference and came up with this:

myDoc = app.activeDocument;

var myGroup_CategoryPage = myDoc.ObjectStyleGroups.itemByName("CategoryPage");

var myObjectStyle_CategoryTableCorner = myGroup_CategoryPage.ObjectStyles.itemByName("CategoryTableCorner");

However I get an error, code 55:

(translated to english):

The object doesn't support the property or method 'ObjectStyleGroups'
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads