Article View: adobe.scripting.indesign
Article #15486Re: AS- Script crashes InDesign 2.0.2
From: Shane_Stanley
Date: Thu, 04 Dec 2003 21:46
Date: Thu, 04 Dec 2003 21:46
50 lines
2007 bytes
2007 bytes
It's hard to say what your problem is, but it might be something to do with copying and pasting via Classic -- that was sometimes flakey in early versions of OS X. I'd seriously consider upgrading to 10.3, or at least 10.2.x. You could also simplify your code quite a bit: --Copy the selected text in InDesign. If an error occurs, alert the user. tell application "InDesign 2.0.2" activate set mySelection to selection try copy on error beep display dialog "Select a table to copy, then run the script again." end try end tell --Bring Microsoft Word to the front --Create a new document in Word, paste the clipboard contents, then perform Table Macro,� --which will save the document as HTML, strip all styles, and save again. tell application "Microsoft Word" activate make new document paste do Visual Basic "Table" end tell set theHD to "Macintosh HD:" set thePath to theHD & "Users:username:Desktop:" set theFile to "table.html" set theText to read file (thePath & theFile) --Switch back to InDesign --Place table.html document into a new text frame, copy the HTML code, and paste over original table. tell application "InDesign 2.0.2" activate select mySelection paste end tell -- Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<4129AF4A-26A3-11D8-9DE9-003065D61B90@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccebe63.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,c23abe018c2c9b8a X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-04 14:08:38 PST From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: AS- Script crashes InDesign 2.0.2 Message-ID: <4129AF4A-26A3-11D8-9DE9-003065D61B90@myriad-com.com.au> Date: Thu, 4 Dec 2003 13:46:02 -0800 References: <2ccebe63.-1@webx.la2eafNXanI> Lines: 52 X-Mailer: Apple Mail (2.606) MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit