Table of contents
Collapse the table of content
Expand the table of content

Application.VisualReportsView Method (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

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


expression. VisualReportsView( ** strVisualReportTemplateFile, ** PjVisualReportsDataLevel )

expression A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
strVisualReportTemplateFileOptionalStringFull path and name of template file.
PjVisualReportsDataLevelOptionalLongThe 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



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.


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") 
 MsgBox ("Template was not viewed successfully") 
 End If 
End Sub
© 2018 Microsoft