Microsoft KB Archive/216689

= WD98: Macro to Set Default Save Format As HTML =

Article ID: 216689

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Word 98 for Macintosh

-



This article was previously published under Q216689





SUMMARY
This article describes the procedure in Visual Basic for Applications (VBA) to set the default save format as HTML if an HTML converter is installed.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is 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 with the tools that are used to create and to debug procedures. Microsoft support engineers 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.

Sub DefaultSaveAsHTML On Error Resume Next a = 0 For Each aFile In FileConverters If aFile.ClassName = "HTML" Then Application.DefaultSaveFormat = "HTML" a = 1 End If  Next aFile If a = 1 Then ActiveDocument.Save Else MsgBox "The HTML converter is not installed" End If End Sub

NOTE: Although this macro provides error checking to ensure that the HTML converter has been installed, this error checking may not function correctly if the converter file has been deleted or the operating system settings still indicate that it is installed. Conversely, "The HTML converter is not installed" message box may appear even with the converter file installed, if the operating system settings are damaged or missing. To resolve this, it may be necessary to do a complete removal of Microsoft Office 98 or Microsoft Word 98 and then reinstall it, including the HTML converter.

Additional query words: 8.00 convert macoffice macword macword98 officedev page publish vba web word98 WD98

Keywords: kbinfo kbprogramming KB216689

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.