Hi i am looking for a macro that can find a specific font being used on which page of my document. Please help
CdrPreflight might do it for you, along with many other handy things. It used to cost money - but free now.
Thats awesome thanks jeff
Chris,
If you look at this post: List Document Fonts it will give you an example of finding all the fonts in a document. It could provide a starting point for what you are asking for.
-Shelby
I knew I had written something like this in the past, just needed to find it. This is better as it does what you ask. Select a line of artistic text and it will draw a yellow rectangle around other text that uses that font.
This is a basic version, It doesn't find Text in Powerclips or if multiple fonts are used in the same line of Artistic Text it would find it. But again, it give you something to build off.
Sub HiliteFont() Dim p As Page, s As Shape, sRect As Shape Dim sr As ShapeRange Dim strFontName As String Dim x As Double, y As Double, w As Double, h As Double If ActiveShape Is Nothing Then MsgBox "Please select a text shape that has the font you are looking for. Exiting...", vbCritical, "HiliteFont": Exit Sub If ActiveShape.Type <> cdrTextShape Then MsgBox "Please select a text shape that has the font you are looking for. Exiting...", vbCritical, "HiliteFont": Exit Sub strFontName = ActiveShape.Text.Story.Font For Each p In ActiveDocument.Pages Set sr = p.Shapes.FindShapes(Query:="@type ='text:artistic' or @type ='text:paragraph' and @com.text.story.Font ='" & strFontName & "'") For Each s In sr.Shapes s.GetBoundingBox x, y, w, h Set sRect = ActiveVirtualLayer.CreateRectangle2(x - 0.1, y - 0.1, w + 0.2, h + 0.2) sRect.Outline.SetNoOutline sRect.Fill.ApplyUniformFill CreateCMYKColor(0, 0, 100, 0) Set sRect = ActiveDocument.LogCreateShape(sRect) sRect.OrderBackOf s Next s Next p End Sub
Happy Coding,
It works but it has 2 issue. my mostly pages are in powerclip. What if i need to find in powerclip as well. I also need a list of font detail on which page my font is used exactly because sometime its in a big font which automaticly highlighted because its big and sometime its in small where it won't see on the page.