🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19394

Re: Scripting the Library

#19394
From: Olav Kvern
Date: Tue, 17 Dec 2002 00:23
26 lines
1438 bytes
Ralph--

Here's a Visual Basic example:



Rem Place an asset from a library 
Dim myInDesign As InDesign.Application 
Set myInDesign = CreateObject("InDesign.Application.2.0") 
Set myDocument = myInDesign.Documents.Add 
Rem Assumes that a library file exists (edit the file path as necessary). 
Set myLibrary = myInDesign.Open("c:\myLibrary.indl") 
Rem Assumes that the library contains an asset named "Example" 
Set myAsset = myLibrary.Assets.Item("Example") 
myAsset.Place myDocument 
Rem InDesign selects the asset after you place it. 
Rem You can get a reference to the placed asset 
Rem by using the Selection object. 
Set myPlacedAsset = myInDesign.Selection.Item(1) 




Thanks,

Ole
Technical Details
Message-ID: <1de70826.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de70826.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,908e760c2ea9fcae
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-16 16:37:43 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Scripting the Library
Message-ID: <1de70826.2@WebX.la2eafNXanI>
Date: Mon, 16 Dec 2002 16:23:08 -0800
References: <1de70826.-1@WebX.la2eafNXanI>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit