Re: Word to HMTL by Peter
Peter
Thu Dec 09 11:22:37 CST 2004
The following sub will autosave the active document as an html file =
named "filename.html" in the current directory every 2 minutes.
Public Sub HTMLSave()
If ActiveDocument.SaveFormat <> wdFormatHTML Then
Call ActiveDocument.SaveAs("filename.html", wdFormatHTML)
Else
Call ActiveDocument.Save
End If
Call Application.OnTime(Now + TimeSerial(0, 2, 0), "Module1.HTMLSave")
End Sub
You have to initially invoke the sub in order to set the timer going; =
that can be done from a custom button, or an AutoOpen/New/Exec macro, or =
wherever.
Note that the sub as written has to be in the module named "Module1". =
If you place it somewhere else or rename it, change the OnTime() =
invocation accordingly.
hth,
-Peter
"Shin" <Shin@discussions.microsoft.com> wrote in message =
news:91FB19DC-A93C-4D1F-9D15-E2C04367E48C@microsoft.com...
> Hi All
>=20
> please can someone help, does anyone know how to autosave a word =
doucument=20
> into hmtl format?
>=20
> Thanks in advance
> Shin
>