🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16859

Re: VB changing TextForm style

#16859
From: Olav Kvern
Date: Thu, 24 Jul 2003 05:46
11 lines
1702 bytes
Ralph--

My guess is that your original approach didn't work because you were applying the formatting before resizing the text frame. At its default (i.e., just created) size, the text frame is 1x1 picas--too small for most default text. So when you tell the *text frame* to change the formatting of paragraph 1, it won't, because it does not yet have any composed paragraphs.

Note that formatting text by text frame is always dangerous for this very reason--if the text has not been composed, the formatting will not get applied. I expect you'll find that your original approach will work if you either a.) resize the text frame before applying the formatting, or b.) apply the formatting to TF2.ParentStory.Paragraphs.Item(1), etc. The latter approach is better, as it formats the text even if the text has not yet been composed.

Sorry about the Scripting Guide not making this point clear.

Thanks,

Ole
Technical Details
Message-ID: <1dea04ab.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!151.189.0.75.MISMATCH!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1dea04ab.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,f0528502556bc92c
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-07-23 23:08:06 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!151.189.0.75.MISMATCH!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: VB changing TextForm style
Message-ID: <1dea04ab.2@WebX.la2eafNXanI>
Date: Wed, 23 Jul 2003 22:46:36 -0700
References: <1dea04ab.-1@WebX.la2eafNXanI>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit