🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1365

Re: Using Grep to find text pattern, get found text, and get page number found on

#1365
From: Ric_Miller
Date: Wed, 11 Feb 2009 22:25
40 lines
1526 bytes
Hi Dave,

Thank you for the reference. I am trying to work with this code.

In my example above, would theObj be:

t.Item(i)

I translated the javascript to vb and that doesn't seem to be working.

When I pass it t.item(i) I get an error:

"Object doesn't support this property or method".

I must be passing the function the wrong object.

Function findPage(theObj)

If (theObj.hasOwnProperty("baseline")) Then
    theObj = theObj.ParentTextFrames(0)
End If

While theObj <> Null And theObj <> Page
    Set t = theObj.constructor
    Select Case t
        Case Null
        Case Character: theObj = theObj.ParentTextFrames(0)
        Case Cell: theObj = theObj.InsertionPoints(0).ParentTextFrames(0)
        Case Application
    End Select

findPage = theObj.Parent
Wend

End Function

Any ideas?

thanks,
Ric
Technical Details
Message-ID: <59b7e2c7.1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b7e2c7.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,c068c4e91c9ba325
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Ric_Miller@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Using Grep to find text pattern, get
 found text, and get page number found on
Message-ID: <59b7e2c7.1@webcrossing.la2eafNXanI>
Date: Wed, 11 Feb 2009 14:25:01 -0800
References: <59b7e2c7.-1@webcrossing.la2eafNXanI>
Lines: 41
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit