🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19294

Re: How to select an inline graphic?

#19294
From: Olav Kvern
Date: Fri, 20 Dec 2002 01:28
30 lines
1677 bytes
ann--

You don't need to select them to resize them. Try something like this:



Rem Resize all of the inline graphics in a document to 50% 
Dim myInDesign As InDesign.Application 
Set myInDesign = CreateObject("InDesign.Application.2.0") 
Set myDocument = myInDesign.ActiveDocument 
For myStoryCounter = 1 To myDocument.Stories.Count 
Set myStory = myDocument.Stories.Item(myStoryCounter) 
    For myInlineCounter = myStory.Inlines.Count To 1 Step -1 
        Set myInline = myStory.Inlines.Item(myInlineCounter) 
        If myInline.ContentType = idGraphic And myInline.PageItems.Count > 0 Then 
            Set myGraphic = myInline.PageItems.Item(1) 
            myGraphic.Resize 50, 50 
            myInline.Fit idFrameToContent 
        End If 
    Next 
Next 




Does that work for you?

Thanks,

Ole
Technical Details
Message-ID: <1de7147f.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news.stealth.net!news.stealth.net!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de7147f.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,4f7436ee13c8fd53,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-12-19 17:38:03 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news.stealth.net!news.stealth.net!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: How to select an inline graphic?
Message-ID: <1de7147f.0@WebX.la2eafNXanI>
Date: Thu, 19 Dec 2002 17:28:48 -0800
References: <1de7147f.-1@WebX.la2eafNXanI>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit