Article View: adobe.scripting.indesign
Article #8363Re: Word doc table into Indesign table blues
From: Shane_Stanley
Date: Sun, 15 Oct 2006 10:14
Date: Sun, 15 Oct 2006 10:14
22 lines
1856 bytes
1856 bytes
This will work with Word 2004 -- just make sure the selection shape and size
match:
tell application "Microsoft Word"
set theContents to content of text object of selection
end tell
set theRows to paragraphs of theContents
set allContents to {}
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {tab}
repeat with i from 1 to count of items of theRows
set allContents to allContents & text items of item i of theRows
end repeat
end
set AppleScript's text item delimiters to oldDelims
-- put them in the table
tell application "Adobe InDesign CS2"
set contents of selection to allContents
end tell
--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<C158470A.31610%sstanley@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc1f953.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,44638fa60e8619f X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Shane_Stanley@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: Word doc table into Indesign table blues Message-ID: <C158470A.31610%sstanley@myriad-com.com.au> Date: Sun, 15 Oct 2006 03:14:02 -0700 References: <3bc1f953.-1@webcrossing.la2eafNXanI> Lines: 25 Received: from bld-mail02.adl2.internode.on.net [203.16.214.66] by adobeforums.com; Sun, 15 Oct 2006 03:14:31 -0700 Received: from [192.168.1.200] (unverified [59.167.75.174]) by mail.internode.on.net (SurgeMail 3.2f) with ESMTP id 242000785 for <adobe.scripting.indesign@adobeforums.com>; Sun, 15 Oct 2006 19:44:06 +0930 (CST) Return-Path: <sstanley@myriad-com.com.au> User-Agent: Microsoft-Entourage/11.2.5.060620 Thread-Topic: Word doc table into Indesign table blues Thread-Index: AcbwQqMC4U/ZIlw1EduelgARJHm3nA== MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing