Folder.WebViewOn Property

Outlook Developer Reference

Returns or sets a Boolean indicating the Web view state for a folder. Read/write.

Version Information
 Version Added:  Outlook 2007

Syntax

expression.WebViewOn

expression   A variable that represents a Folder object.

Remarks

Returns True to display the Web page specified by the Folder.WebViewURL property.

This property is always False if the value of the WebViewURL property is empty.

Also, setting the WebViewOn property to True before setting the WebViewURL property will not display the home page specified in the WebViewURL property.

Example

The following Visual Basic for Applications (VBA) example creates a subfolder under the Inbox folder and assigns a home page to it.

Visual Basic for Applications
  Sub SetupFolderHomePage()
    Dim nsp As Outlook.NameSpace
    Dim mpfInbox As Outlook.Folder
    Dim mpfNew As Outlook.Folder
    
    Set nsp = Application.GetNamespace("MAPI")
    Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox)
    Set mpfNew = mpfInbox.Folders.Add("MyFolderHomePage")
    mpfNew.WebViewURL = "http://www.microsoft.com"
    mpfNew.WebViewOn = True
End Sub

See Also