返回指定对象的 Properties 集合。
本示例添加新属性,并在当前 Web 页上显示该属性。
注意 若要运行本示例,您必须有称为“C:\My Documents\My Webs\Rogue Cellars”的站点(对于在 Microsoft Windows 上运行的服务器 )或称为“C:\WINNT\Profiles\logon alias\Personal\My Webs\Rogue Cellars”的站点(对于在 Windows NT 上运行的服务器),且必须有称为“Zinfandel.htm”的文件。或者,您也可以用另外的站点 URL 或文件来代替。
Private Sub CopyrightAdd()
Dim myWeb As WebEx
Dim myCopyright As String
myCopyright = "Copyright 1999 by Rogue Cellars"
Set myWeb = Webs.Open("C:\My Documents\My Webs\Rogue Cellars")
myWeb.Activate
ActiveWeb.Properties.Add "Copyright", myCopyright
ActiveWeb.RootFolder.Files("Zinfandel.htm").Open
ActiveDocument.body.insertAdjacentText "BeforeEnd", _
ActiveWeb.Properties("Copyright")
ActivePageWindow.Save
ActiveWeb.Close
End Sub