Article View: adobe.scripting.indesign
Article #9152Database to Indesign: Questions
From: Robert Tkaczyk
Date: Mon, 11 Sep 2006 22:08
Date: Mon, 11 Sep 2006 22:08
50 lines
2480 bytes
2480 bytes
> Robert: Thanks for your help, unfortunately, it's yielded no results. I still can't manage to style a single paragraph at a time. Seems like it should be simple. Can you explain exactly what an InsertionPoint is? The InDesign Scripting Reference's description is not very informative, and the Scripting Guide gives examples for NOTHING I need to do. when you create new TextFrame - you also create Story Each Story have at least one TextFrame Story have Characters Each Character have InertionPoint before and after When you don't select text - only place cursor in text - you select InsertionPoint InsertionPoint have the same params like Character - but don't have Contents When you write: Set myStory = myDoc.TextFrames.Add.ParentStory myStory.Contents = "qweqwe" Set myInsertionPoint = myStory.InsertionPoints.Item(4) myInsertionPoints.Contents = "BLA" you will have: "qweBLAqwe" because, first InsertionPoint is before first Character and fourth InsertionPoint is after third Character InsertionPoints.Count = Characters.Count + 1 When you write: Set myStory = myDoc.TextFrames.Add.ParentStory myStory.Contents = "qweqwe" Set myInsertionPoint = myStory.InsertionPoints.Item(4) myInsertionPoints.AppliedCharacterStyle = myCharStyle myInsertionPoints.Contents = "BLA" you will have: "qweBLAqwe" and "BLA" is styled using myCharStyle - because before you set Contents - you set myCharStyle to myInsertionPoint AppliedParagraphStyle - you can use it on any "part" of Paragraph - InsertionPoint, Character, Word, Line (text line), TextRange, Text - and whole Paragraph will be styled I hope you understand me ;) robin
Technical Details
Message-ID:
<111C13CF50261164A53F07AFA66F5529@in.webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.isoc.lu!webcrossingReferences:
<3bc18451.-1@webcrossing.la2eafNXanI> <3bc18451.3@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,fc46c622873f0e2e X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Robert Tkaczyk <indesignscripts@wp.pl> Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Database to Indesign: Questions Message-ID: <111C13CF50261164A53F07AFA66F5529@in.webcrossing.la2eafNXanI> Date: Mon, 11 Sep 2006 15:08:22 -0700 References: <3bc18451.-1@webcrossing.la2eafNXanI> <3bc18451.3@webcrossing.la2eafNXanI> Lines: 57 User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) X-Antivirus: avast! (VPS 0637-0, 2006-09-11), Outbound message X-Antivirus-Status: Clean MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit