🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17816

Re: Load Parastyles

#17816
From: Olav Kvern
Date: Mon, 12 May 2003 16:43
26 lines
1584 bytes
reyman--

You cannot simply copy the object. Instead, you have to copy every property
of the object. Something like this:

doc_style = application.Documents.open(styles_file)
nb = doc_style.ParaStyles.count
For i = 1 To nb
If docStyle.ParaStyles.Item(i).Name <> "[No paragraph style]" Then
set myStyle = docStyle.ParaStyles.Item(i)
style = new_document.ParaStyles.add()
style.Name = myStyle.Name
style.Font = myStyle.Font
style.FontStyle = myStyle.FontStyle
style.PointSize = myStyle.PointSize
Rem And so on, through each property.
Rem You'll have to create colors that correspond to the colors assigned to
Rem FillColor and StrokeColor, as you cannot simply assign
Rem a color object from one document to another.
next i

I think exporting text using the tagged text export method would be faster.

Thanks,

Ole
Technical Details
Message-ID: <1de9083f.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de9083f.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,4db21cbe0e175010
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-12 10:08:36 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Load Parastyles
Message-ID: <1de9083f.2@WebX.la2eafNXanI>
Date: Mon, 12 May 2003 09:43:12 -0700
References: <1de9083f.-1@WebX.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit