Article View: adobe.scripting.indesign
Article #18229VB error trapping
From: pjredman
Date: Wed, 09 Apr 2003 15:49
Date: Wed, 09 Apr 2003 15:49
15 lines
1268 bytes
1268 bytes
I'm trying to include some error handling for instances where a script calls for the active document and there is no active document. Nothing I've tried works as I always get the VB message "Run-time error '30468'". Here's one of my many attempts:
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
On Error Resume Next
If Err.Number <> 0 Then
Msg = "Please open an InDesign document"
MsgBox Msg, vbExclamation
End If
Any suggestions?
Thanks,
Phil Redman
Technical Details
Message-ID:
<1de8aa32.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.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,104efca9bdc36003 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-09 09:08:12 PST From: pjredman <pjredman@usgs.gov> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: VB error trapping Message-ID: <1de8aa32.-1@WebX.la2eafNXanI> Date: Wed, 9 Apr 2003 08:49:32 -0700 Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit