easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

EnableAutoMacros Property

Gets/Sets the flag to indicate whether to enable Word macros.

bool EnableAutoMacros { get; set; }

Property EnableAutoMacros As Boolean

def getEnableAutoMacros(self)
def setEnableAutoMacros(self, value)
boolean getEnableAutoMacros() throws PrinterException
void setEnableAutoMacros(boolean value) throws PrinterException
function getEnableAutoMacros() 
function setEnableAutoMacros($value) 
BclPrnResult GetEnableAutoMacros(BclPrinter* pPrinter, BclBool* poutVal);
BclPrnResult SetEnableAutoMacros(BclPrinter* pPrinter, BclBool newVal);
Property EnableAutoMacros As Boolean

bepprint +Word -macros [on|off]




The default value is False for security reasons, and also to avoid script errors or pop-up dialogs possibly causing the conversion to fail. If you need to run one of the above mentioned macro functions during conversion, set this property to True.

For security reasons you should always disable macros for documents that you do not completely trust, especially on the server side.

Note: In this past, this property only controlled the auto-execute macros. Now it affects all macros and VBA.

Example Usage

Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.WordPrintJob

oPrintJob.EnableAutoMacros = True ' Security risk!

oPrintJob.PrintOut "C:\test\input.doc", "C:\test\output.pdf"