This documentation is archived and is not being maintained.

htmlViewText Property

Office 2003

Returns or sets a String that represents the HTML contained in a specified document.

expression.htmlViewText

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The htmlViewText property returns the same results as the DocumentHTML property. However, when you set the value of the DocumentHTML property equal to a String, the HTML in the document is changed to the value of the new string, while when you set the htmlViewText property equal to a String, the value returned is a Boolean. This represents the comparison of the value of the HTML contained in the document to the String assigned to the htmlViewText property. True indicates that the two strings are the same. False indicates that the two strings are different.

For example, the following code displays a message box that indicates whether the String value assigned to the htmlViewText property is the same as the HTML contained in the document.

    MsgBox ActiveDocument.htmlViewText = "Hello"
  




Show: