Remove All Macros from the Visio Diagram in PHP

Aspose.Diagram - Remove All Macros from the Visio Diagram

To Remove All Macros from the Visio Diagram using Aspose.Diagram Java for PHP, simply invoke RemoveAllMacrosFromDiagram module. Here you can see example code.

PHP Code

 # Create instance of Diagram

$diagram = new Diagram($dataDir."drawing.vsd");

\# remove all macros

$diagram->setVbProjectData(null);

\# Save as VDX

$saveFileFormat=new SaveFileFormat();

$diagram->save($dataDir."RemoveAllMacros.vdx", $saveFileFormat->VDX);

print "Removed all macros from diagram successfully!".PHP_EOL;

Download Running Code

Download Remove All Macros from the Visio Diagram (Aspose.Diagram) from any of the below mentioned social coding sites: