The information in this article applies to:
ERROR MESSAGEWhen you try to delete a style from a document with the use of a Visual Basic for Applications macro, the following error message may appear: For example, when you run the following sample macro code to delete the style "BodyTextIndent", the error message may appear. NOTE: Microsoft Office 2000 has built-in functionality that allows you to get more information about difficult-to-troubleshoot alerts or error messages. If you want to enable this functionality for this and other error messages in Microsoft Office 2000, please download the Microsoft Office 2000 Customizable Alerts file from the Microsoft Office Update Web site at the following address:
http://officeupdate.microsoft.com/2000/downloadDetails/alerts.htmNOTE: If you reached this article by clicking the Web Info button in an error message, you already have Customizable Alerts enabled. CAUSEThe style you are trying to delete does not exist in the document. WHAT TO TRYThe style you are trying to delete does not exist in the document.To avoid receiving the error message when you delete a style from a document, you must first verify that the style has been used in the document.The following sample Visual Basic for Applications macro determines whether the style (Body Text Indent) is being used in the document and, if it is used, it removes the style. If the style does not exist in the document, no message is displayed. Microsoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools 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 needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/refguide/ For additional information about deleting unused styles, please see the following articles in the Microsoft Knowledge Base: Q189297 WD2000: Sample VBA Code to Delete Built-In Style Q193536 WD2000: How to Remove Unused Standard Styles from DocumentBack to Top Additional query words: OFF2000
Keywords : kbdta kbwordvba wd2000 |
Last Reviewed: June 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |