Article View: adobe.scripting.indesign
Article #18165Re: Total Newbie with VB Needs Help
From: Olav Kvern
Date: Thu, 17 Apr 2003 06:09
Date: Thu, 17 Apr 2003 06:09
35 lines
2430 bytes
2430 bytes
Harv--
InDesign does not really support VB.NET yet--you can get it to work, but it can be a fair amount of work. I'd suggest you get VB5 CCE (Control Creation Edition)--it's a free download from Microsoft. It's at: <http://msdn.microsoft.com/vbasic/downloads/tools/cce/default.asp>
All of the example scripts in the Scripting Guide will work with VB5 CCE.
In the meantime, the script for searching/replacing the stroke weight is quite simple--here's a VBScript version.
Rem Change .5 point stroke to 1 point stroke
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
For myCounter = myDocument.AllPageItems.Count To 1 Step -1
Set myPageItem = myDocument.AllPageItems.Item(myCounter)
Select Case TypeName(myPageItem)
Case "Line", "Polygon", "Rectangle", "Oval"
If myPageItem.StrokeWeight = .5 Then
myPageItem.StrokeWeight = 1
End If
Case Else
Rem do nothing
End Select
Next
Copy the script out of the message, save it as a text file with the file extension .vbs, and save it in the Scripts folder inside your InDesign folder. This script will catch all objects that are not on master spreads.
As far as applying a drop shadow to the text in a given paragraph style--you can't apply a drop shadow to some of the text in a text frame. It's got to be the entire text frame. You can convert the text to outlines and apply the shadow to the graphic, or you can put the text inside an inline frame and apply a drop shadow to the frame. Would either of these work for you?
Thanks,
Ole
Technical Details
Message-ID:
<1de894f6.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de894f6.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,9dc40f7b1f727876 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-16 23:38:04 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!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!skynet.be!skynet.be!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Total Newbie with VB Needs Help Message-ID: <1de894f6.1@WebX.la2eafNXanI> Date: Wed, 16 Apr 2003 23:09:33 -0700 References: <1de894f6.-1@WebX.la2eafNXanI> Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit