Application.SaveAsTemplate (Access)
Converts an existing Microsoft Access database file to a database template (*.accdt) format file.
The SaveAsTemplate method replaces the SaveAsTemplate method that was installed with the Microsoft Office Access 2007 Developer Extensions. Templates created by the SaveAsTemplate method cannot be used in Microsoft Office Access 2007 or earlier versions.
SaveAsTemplate (Path, Title, IconPath, CoreTable, Category, PreviewPath, Description, InstantiationForm, ApplicationPart, IncludeData, Variation)
Dim strPath As String: strPath =
Dim strTitle As String: strTitle =
Dim strIconPath As String: strIconPath =
Dim strCoreTable As String: strCoreTable =
Dim strCategory As String: strCategory =
SaveAsTemplate Path:=strPath, Title:=strTitle, IconPath:=strIconPath, CoreTable:=strCoreTable, Category:=strCategory
Arguments
The following arguments are required:
Path (String) - The full path and file name of the database template to create.
Title (String) - The name of the database that is created when the user instantiates the template.
IconPath (String) - An image file to be used as an icon for the database template.
CoreTable (String) - The table that contains the data that users would most want to create a relationship with when they instantiate the template. The ApplicationPart argument must be set to True if you use this argument.
Category (String) - The template category under which the database template will appear on the Available Templates page.
Optional arguments
The following arguments are optional
PreviewPath (String) - An image file to be used as a preview for the database template on the Available Templates page.
Description (String) - A description to be displayed when the user selects the database template on the Available Templates page.
InstantiationForm (String) - Specifies the name of the form to be displayed when the template is instantiated.
ApplicationPart (Boolean) - Specifies whether the template will be displayed when the user chooses Application Parts in the Templates group of the Create ribbon tab. Set to True to display the template when the user chooses Application Parts.
IncludeData (Boolean) - Specifies whether the table data is included in the template. Set to True to include the table data.
Variation