🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2486

[IDCS4][AS] Cut or Copy Table, paste into new rectangle

#2486
From: Stacy_McReynolds
Date: Wed, 17 Dec 2008 16:52
16 lines
1375 bytes
First off I can't believe I'm having issues doing this because it seems like it should be very simple. I need to take a selected table, get the geometric bounds, make a new rectangle with those bounds, then cut the table and paste it into the rectangle.

Getting the bounds and making the rectangle is easy enough, but I can't cut or copy the selected item. Thoughts??

tell application "Adobe InDesign CS4"
	set thefile to active document
	tell thefile
		set mySelection to selection
		set myObject to item 1 of mySelection
		set myclass to class of myObject
		set myPath to geometric bounds of myObject
		cut myObject
		set myrectangle to make rectangle with properties {geometric bounds:myPath, stroke color:"Black", fill color:"None"}
		paste into myrectangle
	end tell
end tell
Technical Details
Message-ID: <59b74b54.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d1265b74bbffbaa0,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Stacy_McReynolds@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [IDCS4][AS] Cut or Copy Table, paste into new rectangle
Message-ID: <59b74b54.-1@webcrossing.la2eafNXanI>
Date: Wed, 17 Dec 2008 08:52:17 -0800
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit