API Documentation > CorelDRAW > 2025-v26 > Application > IVGApplication
Application.CreateDocumentFromTemplate method
Opens a document from a template
Syntax:
Function CreateDocumentFromTemplate(ByVal Template As String, Optional ByVal IncludeGraphics As Boolean = True) As Document
Parameters:
Name Type Description
Template
String
IncludeGraphics
Boolean
Specifies whether to include graphics from the template in the new document.
Remarks:
The CreateDocumentFromTemplate method creates a new document based on a template in CorelDRAW.
Examples:
The following VBA example creates a new document based on the template webtemplate_001.cdt and adds text content to each text block.
Sub Test()
Dim d As Document
Dim s As Shape
Set d = CreateDocumentFromTemplate(Path & "Template\Web\webtemplate_001.cdt", True)
For Each s In d.ActivePage.Shapes
  If s.Type = cdrTextShape Then

 s.Text.Contents = s.Name
  End If
Next s 
End Sub