WD2002: VBA Macro Cannot Find Font Names (823276)
The information in this article applies to:
SYMPTOMSWhen you run a Microsoft Visual Basic for Applications (VBA) macro to find the font names that are used in a Word 2002 document, the font names may not be found.CAUSEThis problem may occur if the document was created in Microsoft Word 97 or earlier.WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, see the following Microsoft Web site: For additional information about the support options available from Microsoft, visit the following Microsoft Web site: To work around this problem, add the NameBi property to your macro as in the following example:
With ARange.Find
.ClearFormatting
.Font.Name = FontName
'Add the following line
.Font.NameBi = ""
Found = .Execute
End With
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
For more information about the NameBi property, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type NameBi in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/29/2005 |
---|
Keywords: | kbprb KB823276 kbAudEndUser |
---|
|