identifying a 'Story' object

B

Bob Eaton

I'm trying to do some processing of individual Story objects in a Publisher
document and I need to keep track of the identification of the Story I'm
working on in case I stop processing in the middle (i.e. so I can restart
where I left off).

Currently, I'm getting the Story to process via:
Document.Selection.TextRange.Story, but when the user restarts the
processing, I need to be able to detect whether he's changed to a different
Story or not. The Start and End properties seem to always be 0-based (unlike
Word ranges, which are 0-based only for the first paragraph), so I can't use
that.

I'm having trouble trying to find some unique identifier of a Story?

Is there any property of a Story (or its children properties) that would
uniquely identify it?

e.g. an index (in the Stories collection) or an index or name for the
associated TextFrame or anything else?

Bob
 
E

Ed Bennett

Bob said:
Is there any property of a Story (or its children properties) that would
uniquely identify it?

Not really. Couldn't you use a Story variable and store a reference to
the Story in that, comparing the new story with the variable?

Failing that, I'd use HasPreviousLink and PreviousLinkedTextFrame to get
back to the beginning of the story, and add a Tag to the text box at the
beginning of the chain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top