Application.VisualReportsView method (Project)

Opens the specified Visual Reports template with the specified level of time.

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 The time level of data, determined automatically or specified from days to years . Can be one of the PjVisualReportsDataLevel constants. The default value is pjLevelAutomatic.

Return value

Boolean

Remarks

The PjVisualReportsDataLevel parameter specifies the level to which the timephased data can be accessed. For example, if pjLevelMonths (months) is specified, it not possible to access pjLevelDays (days).

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

Example

The following example opens the "PCRTSK_U.VST" template for viewing.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.