Article View: adobe.scripting.indesign
Article #16602Re: VB Problem with CreateOutline script
From: Alex Bu
Date: Fri, 15 Aug 2003 00:56
Date: Fri, 15 Aug 2003 00:56
53 lines
3179 bytes
3179 bytes
Hi Ole,
yes that's it. There where some fonts left. But they where only used in some empty text frames. So I just added a routine to convert every empty text frame to a graphic first. Sometimes it happens that you accidently click on a graphic object with the text tool. So it gets converted to a text frame.
I've received so much help from this forum so as a little thank you here is my PrePress Express Script. It's nothing special, because I'm not a real programmer, but maybe some Newbies like me find it useful. It converts every Textframe into outlines and deletes the the remaining tables. So there are no more fonts in the document.
Rem PrePress Express.vbs - v1.0 13/08/03
Rem ----------------------------------
Dim MyIndesign
Set MyIndesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
DelCountTable = 0
CountTextFrames = myDocument.TextFrames.Count
CountGroups = myDocument.Groups.Count
Set myLayers = myDocument.Layers
For Each Layer In myLayers
Layer.Locked = False
Layer.Visible = True
Next
SelectionCount = 0
For MyTextFrameCount = MyDocument.TextFrames.Count to 1 Step -1
If MyDocument.TextFrames.Item(MyTextFrameCount).Characters.Count = 0 Then
MyDocument.TextFrames.Item(MyTextFrameCount).ContentType = idGraphic
SelectionCount = SelectionCount + 1
End If
Next
For InDGroupCount = myDocument.Groups.Count to 1 Step -1
Set InDG = myDocument.Groups.Item(InDGroupCount)
InDG.Ungroup
Next
For InDOutlineCount = myDocument.TextFrames.Count to 1 Step -1
Set InDOutline = myDocument.TextFrames.Item(InDOutlineCount)
InDOutline.CreateOutlines
Next
For MyCount = myDocument.TextFrames.Count to 1 Step -1
If myDocument.TextFrames.Item(MyCount).Tables.Count > 0 Then
DelCountTable = DelCountTable + myDocument.TextFrames.Item(MyCount).Tables.Count
myDocument.TextFrames.Item(MyCount).Delete
End If
Next
MsgBox ("- Unlocked all layers" & vbCrLf & "- Converted " & SelectionCount & " empty Text Frames to Graphics" & vbCrLf & "- Ungrouped " & CountGroups & " Groups" & vbCrLf & "- Converted " & CountTextFrames & " Text Frames/Tables to outlines" & vbCrLf & "- Deleted " & DelCountTable & " unnecessary Tables" & vbCrLf & "- " & myDocument.Fonts.Count & " Fonts left in Document")
Btw, it there a way to do this routines without ungrouping all groups?
Alex
Technical Details
Message-ID:
<1dea5235.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!sn-xit-09!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1dea5235.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,9a813526fe943003 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-08-14 18:07:42 PST From: "Alex Bu" <12three@gmx.de> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!sn-xit-09!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: VB Problem with CreateOutline script Message-ID: <1dea5235.1@WebX.la2eafNXanI> Date: Thu, 14 Aug 2003 17:56:23 -0700 References: <1dea5235.-1@WebX.la2eafNXanI> Lines: 69 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit