Results 1 to 2 of 2

Thread: Listing Fonts on Page

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Posts
    1

    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
    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



    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

    -Ronnie

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    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

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width