Writes the specified PageWindowEx object to the destination URL.
expression.SaveAs(DestinationUrl, ForceOverwrite)
expression An expression that returns a PageWindowEx object.
DestinationUrl Required String. A string that contains the entire URL for the web, such as “C:\My Documents\My Webs\Adventure Works\index.htm”. This can be any URL for a web, such as http://web server/folder/file or file://file system/folder/file for disk-based webs.
ForceOverwrite Optional Boolean. The default value is True.
This example saves an existing file to another web under a new name. (It isn't necessary to change the name of the file.) The program first activates the container web, and then it opens the file so that a page window is established for the file. The page window is assigned to a variable and saved to a different web under a new name.
Note You must have a file named Zinfandel.htm in the C:\My Webs folder, or change the name of the file in the program to match an existing file in your web.
Private Sub SaveAsNewFile()
Dim myFile As WebFile
Dim myPageWindow As PageWindowEx
Webs("C:\My Webs").Activate
Set myFile = ActiveWeb.RootFolder.Files("Zinfandel.htm")
myFile.Open
Set myPageWindow = ActivePageWindow
myPageWindow.SaveAs ("C:\My Webs\Rogue Cellars\Zinfandel Sale.htm")
myPageWindow.Close
End Sub