Article View: adobe.scripting.indesign
Article #14512Re: [VB] Can't replace story.
From: Iolaire_McFadden
Date: Tue, 27 Jan 2004 15:30
Date: Tue, 27 Jan 2004 15:30
20 lines
1789 bytes
1789 bytes
It looks as if you just deleted your myTopTextFrame.ParentStory in line 4? So can you reference it in myTopTextFrame.ParentStory.InsertionPoints.Item(-1).Contents = iPre?
This is how I've been emptying out a string of text frames then placing some text in it. The text frames are linked starting with a 1 column headline box then 2 column body boxes. Might it help you?
Sub test_place_copy()
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application")
Set myDocument = myInDesign.ActiveDocument
' remove any excess body text
Do
myDocument.TextFrames.Item("Document_Body_1").Contents = ""
Loop Until myDocument.TextFrames.Item("Document_Body_1").Contents = ""
Do
' remove any excess headline text
myDocument.TextFrames.Item("Document_Body_Headline").Contents = ""
Loop Until myDocument.TextFrames.Item("Document_Body_Headline").Contents = ""
' place the text from this path
text_path = "C:\text.rtf"
' place the text
myDocument.TextFrames.Item("Document_Body_Headline").Place (text_path)
End Sub
Technical Details
Message-ID:
<2ccf9798.0@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf9798.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,1aa23796bcc9833 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-27 07:37:52 PST From: Iolaire_McFadden@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Can't replace story. Message-ID: <2ccf9798.0@webx.la2eafNXanI> Date: Tue, 27 Jan 2004 07:30:22 -0800 References: <2ccf9798.-1@webx.la2eafNXanI> Lines: 25 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit