how to find a subtitute font in a multiple page document. Exactly where is that font and on how many pages it has been used?
A 'substitute font' can be found only if you know its name. The term 'substitute font' does not have any signification for VBA.
If you want to know in how many pages that specific font has been used it is not a big problem, but how would you like to express 'where is that font'? Using x,y coordinates? What do you have in mind when you ask about that?
For instance, you can use the next piece of code to create a string containing the page name where the specific font is found as many times as it exists on that page. The code does not search in groups (it can be done to do also that if necessary but it is just an example). In order to play with it you should create a number of text boxes on each page you want, some of them to use the font 'Arimo'. It is easy to specify whatever font name you need:
Dim CurSH As Shape, P As Page, strFont As String, strFontName As String
strFontName = "Arimo"
For Each P In ActiveDocument.Pages
For Each CurSH In P.Shapes
If CurSH.Type = cdrTextShape Then
If CurSH.Text.Story.Font = strFontName Then strFont = strFont & P.Name & vbCrLf
The code can be adapted to return whatever you need. This is the basis I think in order to search a specific font in all pages...
© Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions / User Guidelines.