-
Listing Fonts on Page
Hey all... im another newbie setting stage to the world of VBA. Im dense, so lets cut to the chase.
Im using CorelDraw 12 and the VBA macros (GMS) and I recently managed to get some insight on listing 'active' fonts in an open document. Here's the code:
Code:
Sub ProcessAllObjects()
FindFontNames ActivePage.Shapes, FontCollection
MsgBox FontCollection
End Sub
Public Sub FindFontNames(ss As Shapes, FontCollection)
Dim s As Shape
For Each s In ss
If s.Type = cdrGroupShape Then
FindFontNames s.Shapes, FontCollection
Else
If s.Type = cdrTextShape Then
FontCollection = FontCollection & " " & s.Text.FontProperties.Name & Chr(13)
End If
End If
Next s
End Sub
:cool: But! this brings up a message box. which is fine but not what me want here.
I'd like to display the fonts used in my document typed out in the document.
Example output:
Fonts Used:
-> CoopHeavy
-> Gotham Condensed
-> Grant Antique
or this choppy pic
http://www.signfxfactory.com/preview...cure_Salon.jpg
Basically, a code for listing fonts, also a memory helper to identify certain fonts I wont use much or need to know which ones to activate in Extensis Suitcase.
Dig?
Well... thanx all to those that help out :thumb:
-Ronnie
-
So create a new shape/object, put the returned fonts into the text part of that shape/object, change the shape/objects font size to 10 and try to reposition somehow (perhaps you can get the height and do some maths for positioning in the bottom left?
Vince