• Save As HTML from a Macro (97)

    Author
    Topic
    #361621

    Does anyone know how to save a Word file as HTML from a Macro?

    Thanks for your help

    Viewing 0 reply threads
    Author
    Replies
    • #547391

      I have Word2000, so this might not be the same…

      I thought at first that there might be a converter you could use with the .SaveAs method. In 2000, it’s called wdFormatHTML. Since Word97 apparently did not have a special constant for HTML, I wrote a little discovery routine to smoke out the converters:

      Sub ListConverters()
      Dim cnv As FileConverter
      For Each cnv In FileConverters
          If cnv.Application = "Microsoft Word" Then
              On Error GoTo NoSaveFormat
              Debug.Print cnv.SaveFormat & " - "; cnv.Name & " - " & cnv.FormatName
      MoreFormats:
          End If
      Next
      Exit Sub
      
      NoSaveFormat:
      Debug.Print "N/A - "; cnv.Name & " - " & cnv.FormatName
      Resume MoreFormats
      End Sub

      But I didn’t find the HTML one there on 2000. Maybe you will find one for 97? If not, perhaps a spin through the MS Knowlege Base will pop up an answer.

    Viewing 0 reply threads
    Reply To: Save As HTML from a Macro (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: