Share via


Application.VisualReportsView Method

Project Developer Reference

Opens the specified template with the specified level of data for viewing.

Syntax

expression.VisualReportsView(strVisualReportTemplateFile, PjVisualReportsDataLevel)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
strVisualReportTemplateFile Optional String Full path and name of template file.
PjVisualReportsDataLevel Optional Long Open data level. Can be one of the PjVisualReportsDataLevel constants.

Return Value
Boolean

Remarks

Opening the template with a data level that is not supported results in an error.

Example

The following is an example of opening the "PCRTSK_U.VST" template for viewing.

Visual Basic for Applications
  Sub a()
     Dim tf As Boolean
    tf = Application.VisualReportsView("D:\Program Files\Microsoft Office\Office12\1033\PCRTSK_U.VST", pjLevelAutomatic)
    If tf = True Then
    MsgBox ("Template was viewed successfully")
    Else
    MsgBox ("Template was not viewed successfully")
    End If
End Sub

See Also