Saves a PageWindowEx object.
expression.Save(ForceOverwrite)
expression An expression that returns a PageWindowEx object.
ForceOverwrite Optional Boolean. The ForceOverwrite argument can be used to write over an existing file. The default value is True.
This example creates a property, adds it to a file, and then saves the active page window.
Note To run this example, you must have a web called "C:\My Documents\My Webs\Rogue Cellars" (for a server running on Microsoft Windows) or "C:\WINNT\Profiles\logon alias\My Webs\Rogue Cellars" (for a server running on Windows NT), or you may substitute an alternative web URL and file.
Private Sub AddSaleText()
Dim myWeb As WebEx
Dim myFile As WebFile
Dim mySaleProp As String
Dim mySaleText As String
mySaleText = "Vintage Wines for Oktoberfest Sale!!!"
Set myWeb = Webs.Open("C:\My Documents\My Webs\Rogue Cellars")
Set myFile = ActiveWeb.RootFolder.Files("Sale.htm")
myFile.Properties.Add "SaleText", mySaleText
mySaleProp = myFile.Properties("SaleText")
myFile.Open
ActiveDocument.body.insertAdjacentText "BeforeEnd", mySaleProp
ActivePageWindow.Save
WebWindows.Close
End Sub