Thread View: adobe.scripting.indesign
5 messages
5 total messages
Started by Joaquin_Zarasul
Fri, 20 Feb 2009 12:54
[CS2 JS] Get the parent paragraph of a table
Author: Joaquin_Zarasul
Date: Fri, 20 Feb 2009 12:54
Date: Fri, 20 Feb 2009 12:54
10 lines
899 bytes
899 bytes
Hi, Anybody here who knows how to get the parent paragraph of a selected table? var myTable = app.selection[0]; var myStory = myTable.parent.paragraphs; The script above gives me all the paragraphs of the parent text frame. I want to know the index of the paragraph where my selected table is. Appreciate the help you can give. Thanks!
Re: [CS2 JS] Get the parent paragraph of a table
Author: Robert Tkaczyk
Date: Fri, 20 Feb 2009 13:42
Date: Fri, 20 Feb 2009 13:42
17 lines
1101 bytes
1101 bytes
from VB6 ObjectBrowser (PC):
Property StoryOffset As InsertionPoint
read-only
Member of InDesign.Table
The location of the Table in the parent story.
so (VB6):
myTable.StoryOffset.Paragraphs.Item(1)
should give you paragraph
robin
--
www.adobescripts.com
Re: [CS2 JS] Get the parent paragraph of a table
Author: Dave_Saunders
Date: Sun, 22 Feb 2009 06:00
Date: Sun, 22 Feb 2009 06:00
3 lines
690 bytes
690 bytes
Back in CS2 days, I think the storyOffset was an index rather than an insertion point. Dave
Re: [CS2 JS] Get the parent paragraph of a table
Author: Robert Tkaczyk
Date: Sun, 22 Feb 2009 12:28
Date: Sun, 22 Feb 2009 12:28
14 lines
1106 bytes
1106 bytes
you are right Dave, I hade to copy it from CS3 :(
so in VB6 it could be like this:
myTable.Cells.Item(1). _
Texts.Item(1). _
ParentTextFrames.Item(1). _
ParentStory.Characters.Item(myTable.DocumentOffset). _
Paragraphs.Item(1)
robin
--
www.adobescripts.com
Re: [CS2 JS] Get the parent paragraph of a table
Author: Joaquin_Zarasul
Date: Tue, 24 Feb 2009 07:50
Date: Tue, 24 Feb 2009 07:50
1 lines
712 bytes
712 bytes
Thanks so much Robert! I do not know VBscripting but definitely what you gave was what I needed! Again, thank you!
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