🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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
#1023
Author: Joaquin_Zarasul
Date: Fri, 20 Feb 2009 12:54
10 lines
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
#1024
Author: Robert Tkaczyk
Date: Fri, 20 Feb 2009 13:42
17 lines
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
#1046
Author: Dave_Saunders
Date: Sun, 22 Feb 2009 06:00
3 lines
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
#1051
Author: Robert Tkaczyk
Date: Sun, 22 Feb 2009 12:28
14 lines
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
#1097
Author: Joaquin_Zarasul
Date: Tue, 24 Feb 2009 07:50
1 lines
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