Article View: adobe.scripting.indesign
Article #14642[VB] Can't replace story.
From: Brian_C._Carter
Date: Mon, 26 Jan 2004 23:20
Date: Mon, 26 Jan 2004 23:20
15 lines
1467 bytes
1467 bytes
I have a story that goes through 3 text frames that I want to delete and replace with a different story. If i just delete the story then I can put in a line of text, but it seems to fail when i try to insert a forced line break. Does anybody know why? Should I be using a different method? Set myGroup = myPage.Groups.Item(myNumberToFind) Set myTopTextFrame = myGroup.TextFrames.Item(1) Set myStory = myTopTextFrame.ParentStory myStory.delete myDescriptionNumber = "Description " if not isnull(ipre) or iPre = "" Then myDescriptionNumber = myDescriptionNumber & "1," myTopTextFrame.ParentStory.InsertionPoints.Item(-1).Contents = iPre myTopTextFrame.ParentStory.Paragraphs(1).AppliedParagraphStyle = myDocument.ParagraphStyles.Item(myDescriptionNumber) myTopTextFrame.ParentStory.InsertionPoints.Item(-1).Contents = idForcedLineBreak End If
Technical Details
Message-ID:
<2ccf9798.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!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,1aa23796bcc9833,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-26 15:37:58 PST From: Brian_C._Carter@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: [VB] Can't replace story. Message-ID: <2ccf9798.-1@webx.la2eafNXanI> Date: Mon, 26 Jan 2004 15:20:32 -0800 Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit