Article View: adobe.scripting.indesign
Article #18339Checking for existence in VB
From: Chris Baier
Date: Mon, 07 Apr 2003 20:21
Date: Mon, 07 Apr 2003 20:21
24 lines
1608 bytes
1608 bytes
I'm a wiz in AppleScript, but new to Visual Basic. I'm now converting some ID AppleScripts to Visual Basic. My question is how to check for something's exisitence in VB. In AS, it's easy: if exists text box "Text One" then... but how do I do it in VB? I need to check for an exisiting Paragraph style and an exisiting text box (I know exactly where the text box is and what it's name is since it may already have been created by this same script.) here's roughly what I want to do: If not exists paragraph style "My Style" then create paragraph style "My Style" if not exists text box "My Box" then create text box "My Box" set contents to NewContents else replace contents of "My Box" with NewContents I could loop through all the paragraph styles and examine their names, but what about the box? Loop thru every text box on the page?
Technical Details
Message-ID:
<1de8a2cf.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,ded3b14496b0137a,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-07 13:37:51 PST From: "Chris Baier" <chris.baier@us.pwcglobal.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Checking for existence in VB Message-ID: <1de8a2cf.-1@WebX.la2eafNXanI> Date: Mon, 7 Apr 2003 13:21:59 -0700 Lines: 28 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit