Article View: adobe.scripting.indesign
Article #16230[VB]Placing text in frame, with different styles
From: Eelko_Heuvelmans
Date: Fri, 03 Oct 2003 13:44
Date: Fri, 03 Oct 2003 13:44
19 lines
1785 bytes
1785 bytes
Hi All, I'm trying to place some text in a textframe. but i encountered some problems while trying to apply characterstyles. Here is how the situation is right now: When i have created a frame i use the following code to put the text in the newly created frame and to applay a ParagraphStyle to that text: myTextFrame.TextContents = strToPlace myTextFrame.Paragraphs.Item(1).ParagraphStyle = strParaStyle This works fine. Then, some time later in my script, i run into a line that has to add new text to that same textframe. but, it has to have a Characterstyle!! As an Indesign noob i'm quite stuck here. There seem te be lots of ways to achief this (textwords, textstylerange, characterstyle.. etc) But i can't finf out how to apply these settings and how to add the new text to the frame. I have also tried to do something with the insertionpoins and stuf, but got stuck. I probably is quite simple, but i'm not sure how to tackle this one. Can anyone give me a hint, piece of code or some advise? Thanx in advance Eelko
Technical Details
Message-ID:
<2ccd9e01.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,2da61a4116613d05 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-03 07:08:11 PST From: Eelko_Heuvelmans@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: [VB]Placing text in frame, with different styles Message-ID: <2ccd9e01.-1@webx.la2eafNXanI> Date: Fri, 3 Oct 2003 06:44:53 -0700 Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit