Object: Application.ActiveDocument.DocumentHTML
This function will return all of the DocumentHTML.
It will return the <html> tag and the </html> tag and everything between them.
It will also return the HTML immediately above the <html> start tag. On
my pages that line typically is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Function GetDocumentHTML() As String 'Tested 20090208 On Error GoTo errHandler1 GetDocumentHTML = _ Application.ActiveDocument.DocumentHTML Exit Function errHandler1: 'Notify user of failure. MsgBox "GetDocumentHTML has failed", _ vbCritical, "Function Failure" End Function