The information in this article applies to:
ERROR MESSAGEWhen you try to save a document in a different file format using a recorded Visual Basic for Applications (VBA) macro, the following error message may appear:
Where <\016\000> is the value that corresponds to the file format value assigned to the converter on the computer where the macro was recorded. 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 value assigned as the export converter in the macro is assigned to an import-only converter on the computer on which the macro is being run. WHAT TO TRYIf you record a macro that changes the file type, the FileFormat property will contain a number. The following sample macro was recorded using HTML as the "Save as type":
Note the number 103 that was recorded for the HTML FileFormat argument.
This number may not be the same on another computer.Use any of the following methods to resolve this problem: Method 1: Use the FileFormat built-in conversion constant.FileFormat accepts the following built-in conversion constants:
Method 2: Use the FileConverters collection to retrieve the correct FileFormat number for a conversion type for any computer.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/overview/overview.aspThe following sample Visual Basic for Applications macro saves a document in HTML format on any computer: NOTE: In the following example, replace "HTML" with the class name you want to use for Save As. For a list of class names, see the "Use the class name of the converter" section later in this article.
Method 3: Use the class name of the converter.The following list contains converters and class names installed by Word that you can use for saving a document:
To retrieve other class names for an installed converter to use for a Save As operation, you can loop through the FileConverters collection.
The following sample macro loops through all installed converters that you
can use for saving and then inserts the converter name and associated
class name into a blank document:
Back to Top Additional query words: OFF2000
Keywords : kbdta |
Last Reviewed: September 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |