ReportTemplate.TemplatePath property (Project)
Gets the path and file name of the Visual Report template. Read-only String.
Syntax
expression. TemplatePath
expression A variable that represents a ReportTemplate object.
Remarks
The Visual Report template files are stored in the following directory for each user , where LCID is the language code identifier such as 1033 for U.S. English: C:\Users\[UserAlias]\AppData\Roaming\Microsoft\Templates\[LCID]\
. For example, adr1.xlt is a Microsoft Excel template.
Example
The following example lists all of the Visual Report template types and files for the current user.
Sub ListTemplatePaths()
Dim templateList As String
Dim typeOfTemplate As String
Dim template As ReportTemplate
For Each template In Application.VisualReportTemplateList
Select Case template.templateType
Case pjExcel
typeOfTemplate = "Excel"
Case pjVisioMetric
typeOfTemplate = "Visio Metric"
Case pjVisioUS
typeOfTemplate = "Visio U.S."
Case Else
End Select
templateList = templateList & vbCrLf & typeOfTemplate & ": " _
& template.TemplatePath
Next template
MsgBox "Visual Reports Templates:" & templateList
End Sub
See also
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.