NewPageorWeb Property

Microsoft FrontPage Visual Basic

NewPageorWeb Property

Returns a NewFile object that represents a page or Web site listed on the New task pane.

expression.NewPageorWeb

expression    Required. An expression that returns an Application object.

Example

The following example creates a new instance of the NewFile object and adds a file named "template.htm" to the New task pane. The new file listing will show up under the Other files section listed at the bottom of the task pane.

    Sub NewPage()
'Creates a new page using the NewFile object

   Dim objApp As FrontPage.Application
   Dim objNewFile As NewFile
   Set objApp = FrontPage.Application
   
   'Create a reference to an instance of the NewFile object
   Set objNewFile = objApp.NewPageorWeb
   objNewFile.Add "template.htm"

End Sub