🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16686

Re: Automate Document Formatting

#16686
From: John Darnell
Date: Wed, 13 Aug 2003 13:25
21 lines
2067 bytes
Ryan:

Though my InDesign scripting experience is on the Apple side, I took a quick gander at the text frame object in the InDesign documentation for VB. It has a PLACE command, just as the AS object does. It should be a matter of identifying the frame you want, then using the PLACE method (caps for emphasis) to import the tagged text.
   I suppose that an intermediate step would be needed to read the tagged text from the database into a flat text file so that it *could* be imported, but that should not be difficult in VB. According to my many conversations with Ole (mostly through this forum) the only way to get tagged text to work is if one imports it using the PLACE command (jump in, Ole, and correct me if I am wrong).

Here's an english-like algorithm based upon XBASE language:

Use MyDatabase Index MyIndex
select "SomeKey"
MyTaggedText = MyMemoField

Open "TextFile" for writing
Write MyTaggedText
Close "TextFile"

set TheAppropriateFrame to text frame n
TheAppropriateFrame.place("TextFile")

I'm guessing about syntax and faking it where I don't know, but that's beside the point. The above steps should (with a few language-specific additions) get your text from a database to a text frame in an InDesign document through VB.

Good Luck!
Technical Details
Message-ID: <1dea3f06.4@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1dea3f06.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,f049f32e4bcfcce9
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-08-13 06:38:00 PST
From: "John Darnell" <John.Darnell@Walsworth.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Automate Document Formatting
Message-ID: <1dea3f06.4@WebX.la2eafNXanI>
Date: Wed, 13 Aug 2003 06:25:11 -0700
References: <1dea3f06.-1@WebX.la2eafNXanI>
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit