I have some code that creates a MS Word document. I am able to save the document as rtf format using the following code:
Dim SaveAsName as String
.ActiveDocument.SaveAs _
Filename:=SaveAsName
I would like to use the code below (copied from a Word recorded macro) to save the file as HTML. My code bombs on:
FileFormat:= wdFormatHTML
saying variable not defined.
Dim SaveASHTML as String
.ActiveDocument.SaveAs Filename:=SaveAsHTML, FileFormat:= _
wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
Any advice?
Regards...Tom
This message was edited by strorg on 2002-11-04 12:18
Dim SaveAsName as String
.ActiveDocument.SaveAs _
Filename:=SaveAsName
I would like to use the code below (copied from a Word recorded macro) to save the file as HTML. My code bombs on:
FileFormat:= wdFormatHTML
saying variable not defined.
Dim SaveASHTML as String
.ActiveDocument.SaveAs Filename:=SaveAsHTML, FileFormat:= _
wdFormatHTML, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
Any advice?
Regards...Tom
This message was edited by strorg on 2002-11-04 12:18