🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #136

Re: Add Formatted Text

#136
From: Chris_Van_Jones
Date: Thu, 02 Apr 2009 17:06
8 lines
1153 bytes
Excellent. I now have a follow-up question. How can I add a new line of text? For example, the above script writes "Voiceover" in BigRed paragraph style. Now I want to add a new line under "Voiceover" that says "Line 2" in a different paragraph style. This is what I have come up with:

app.selection[0].paragraphs[0].insertionPoints[0].contents = 'Voiceover'
app.selection[0].paragraphs[0].appliedParagraphStyle = 'BigRed'
app.selection[0].paragraphs[0].insertionPoints[10].contents = 'Line 2'
app.selection[0].paragraphs[0].appliedParagraphStyle = 'BigRed2'

Thanks Again!
Technical Details
Message-ID: <59b87b8f.1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b87b8f.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,15d68b48193a17a0
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Chris_Van_Jones@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Add Formatted Text
Message-ID: <59b87b8f.1@webcrossing.la2eafNXanI>
Date: Thu, 2 Apr 2009 10:06:51 -0700
References: <59b87b8f.-1@webcrossing.la2eafNXanI>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit