其他分享
首页 > 其他分享> > 【CorelDraw VBA 005例】 列出文档中的字体

【CorelDraw VBA 005例】 列出文档中的字体

作者:互联网

Sub ListDocumentFonts()
    '##列出文档中的字体
    Dim p As Page
    Dim s As Shape
    Dim col As New Collection
    Dim sFontList As String
    Dim vFont As Variant
    For Each p In ActiveDocument.Pages
        For Each s In p.FindShapes(, cdrTextShape)
            FindFontsInRange s.Text.Frame.Range, col
        Next s
    Next p
    sFontList = ""
    For Each vFont In col
        If sFontList <> "" Then sFontList = sFontList & vbCrLf
        sFontList = sFontList & vFont
    Next vFont
    ActiveDocument.Pages(1).ActiveLayer.CreateParagraphText 0, 0, 3, 8, sFontList, Font:="Arial", Size:=10
End Sub

  

标签:Dim,VBA,vFont,sFontList,Next,005,Each,CorelDraw,col
来源: https://www.cnblogs.com/ExcelSoSo/p/15596577.html