Article View: adobe.scripting.indesign
Article #16397Re: [VB] Center a right aligned paragraphs in a table
From: Dave Saunders
Date: Mon, 22 Sep 2003 21:35
Date: Mon, 22 Sep 2003 21:35
18 lines
1593 bytes
1593 bytes
Guy, To get a: Set a to 0 Interate through each line subtracting the horizontal offset of insertion point 1 from the horizontal offset of insertion point -2 of each line. Compare result with a; if larger, set a to it. At the end, you have a. To get b: Set justification of first paragraph to full justification. Set left and right indents and first line indent of the paragraph to 0. Subtract the horizontal offset of insertion point 1 of the first line from the horizontal offset of insertion point -2 of the first line. That's the value of b. Reset the first paragraph's justification and first line indent (actually, if you have first line indents you might get the wrong result) and then set the right indent of all the lines to (b-a)/2. I am not at all fluent in VB, so this is the best that I can do for you. Dave
Technical Details
Message-ID:
<2ccd7909.6@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccd7909.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,87869e3f37548296 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-09-22 14:37:50 PST From: "Dave Saunders" <daves@pdsassoc.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeeds.sol.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Center a right aligned paragraphs in a table Message-ID: <2ccd7909.6@webx.la2eafNXanI> Date: Mon, 22 Sep 2003 14:35:04 -0700 References: <2ccd7909.-1@webx.la2eafNXanI> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit