addMacroFromDoc

addMacroFromDoc

TRIAL / ADVANCED / PREMIUM

Imports a macro from another Word document.

Description
public addMacroFromDoc ( string $path )

With the help of this method you can import the macros from an existing Word file.

You should create an instance of CreateDocx with the 'docm' option in order to obtain a functional Word document with macros as a result.

Parameters

path

The path of the Word document (.docm) from which you wish to import the macros.

Exceptions

Not DOCM base template.

The file can't be open.

Code samples

Example #1