.. highlightlang:: us .. index:: auto_LoadTemplate .. _auto_loadtemplate: auto_LoadTemplate ================= .. us.tag auto_LoadTemplate NOTREADYENGLISH :ref:`auto_LoadTemplate` opens a template. .. function:: hPage = auto_LoadTemplate(ssFileName) hPage = auto_LoadTemplate(ssFileName, ssPageName) .. us.return **Return Value** *hPage* is the handle of the page that was created from the template. With this handle, the functions that access the page object can be called (See example 2). .. us.params **Parameters** .. uparam:: ssFileName *ssFileName* is the name of the template file. The template name can be specified without the drive and path name. In this case, the functions looks for the template in the specified automation script directories, e.g. ``auto_LoadTemplate("template1.ipw")``. .. uparam:: ssPageName *ssPageName* is the template's page name. If this parameter is not given, the first page from the template will be loaded. .. us.example **Example** Example 1: The following example creates a copy of the first page of the file :file:`template-en.ipz`. :: auto_LoadTemplate(GetRootDirectory() + "template/template-en.ipz"); Example 2: In this example, the return value *hPage* is used to save the page as a Meta file. :: hPage = auto_LoadTemplate("c:/uniplot/template/file.ipz"); PageSaveAsMetafile(hPage, "c:/test.wmf"); .. seealso:: :ref:`overview-automation`, :ref:`GetRootDirectory`, :ref:`PageSaveAsMetafile`, :ref:`PageSetTitle`, :ref:`auto_SetTemplate` :sub:`id-1812115`