🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17166

Re: Merge table cells across selection [AS]

#17166
From: Jay Fraser
Date: Thu, 26 Jun 2003 23:35
29 lines
1686 bytes
Less picky version:



tell application "InDesign 2.0.2" 
	try 
		if class of selection is text or class of selection is insertion point then 
			set myTable to parent of parent of selection 
		else 
			set myTable to parent of selection 
		end if 
	on error 
		activate 
		display dialog "Having problems. Please select a cell or some text from the table you want to change." buttons "cancel" 
	end try

	if class of myTable is table then 
		tell myTable 
			repeat with i from 1 to (count columns) 
				set myFirstCell to i & ":1" as text 
				set mySecondCell to i & ":2" as text 
				merge (cells myFirstCell thru mySecondCell) 
			end repeat 
		end tell 
	else 
		activate 
		display dialog "Having issues. Please select a cell or some text from the table you want to change." buttons "cancel" 
	end if 
end tell
Technical Details
Message-ID: <1de9b268.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!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de9b268.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,fee4b0975e1fe1f6
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-26 16:37:39 PST
From: "Jay Fraser" <jayfraser@yahoo.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Merge table cells across selection [AS]
Message-ID: <1de9b268.1@WebX.la2eafNXanI>
Date: Thu, 26 Jun 2003 16:35:02 -0700
References: <1de9b268.-1@WebX.la2eafNXanI>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit