RefreshDocument Method

Microsoft Office Object Model

RefreshDocument Method

       

Refreshes the specified HTML project in the Microsoft Office host application.

expression.RefreshDocument(Refresh)

expression   An expression that returns an HTMLProject object.

Refresh   Required Boolean. True if all changes are to be saved; False if all changes are to be ignored.

Remarks

Using this method is equivalent to clicking the Refresh button on the Refresh toolbar in the Office host application. If you refresh the document by setting the RefreshDocument method to True, all changes to the HTML source made in the Microsoft Script Editor are saved in the Office host application. If you set RefreshDocument to False, all changes to the HTML source are ignored. Note that the value returned by the State method is affected by the RefreshDocument method. If you call RefreshDocument (True), the State method returns msoHTMLProjectStateDocumentProjectUnlocked if it is called after the refresh operation.

Example

This example refreshes the HTML project in the active workbook in the host application.

ActiveWorkbook.HTMLProject.RefreshDocument (True)