SaveCopyAs Method

Microsoft Office Visual Basic

Saves the specified HTML project item using a new file name.

expression.SaveCopyAs(Filename)

expression    An HTMLProjectItem object.

Filename    Required String. The fully qualified path of the file to which you want to save the HTML project item.

Example

This example saves a copy of the text of the current HTML project item to the file NewScript.txt.

ActiveWorkbook.HTMLProject.HTMLProjectItems. _
    Item(1).SaveCopyAs("C:\NewScript.txt")