🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16424

Re: [VB] Ittarate over pageitems won't work

#16424
From: Eelko Heuvelmans
Date: Fri, 12 Sep 2003 11:34
16 lines
1662 bytes
Jens,
Thanx for your quick reaction!
but sorry.. it's not the toString method.
the error is in this line: myPageItem = myPage.AllPageItems.Item(i)
In .Net every object has an ToString function, wich returns a string repreatation of the object. Even if a valid string can't be produced, there will be a string (so to say..)

But, i tried to revome the tostring (you'll never know) but still the error occurs:
"unhandled exception of type 'System.InvalidCastException' occurred in Indesign1.exe

Additional information: Specified cast is not valid."

I just ahd lunch, so i will take another fresh look at it,.. but i realy find this strange :D

Does anyone have a simple VB example that itterates throug all page items on a page and places text in the page item with label "header" (because that's what i'm trying to acomplish)

Thanx!
Technical Details
Message-ID: <2ccd6887.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!diablo.voicenet.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccd6887.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,434b6b988840c727
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-12 04:37:57 PST
From: "Eelko Heuvelmans" <eelko.heuvelmans@planet.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!diablo.voicenet.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: [VB] Ittarate over pageitems won't work
Message-ID: <2ccd6887.1@webx.la2eafNXanI>
Date: Fri, 12 Sep 2003 04:34:51 -0700
References: <2ccd6887.-1@webx.la2eafNXanI>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit