Object Model Reference : Classes : A : Application : Methods : Application.CreateDocumentFromTemplate |
Function CreateDocumentFromTemplate(Template As String, [IncludeGraphics As Boolean = True]) As Document
Member of Application
The CreateDocumentFromTemplate method creates a new document based on a template in CorelDRAW.
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 |
Copyright 2013 Corel Corporation. All rights reserved.