HotXLS Documentation

LoadVBAProjectFromFile method

Loads a classic XLS VBA OLE storage payload from a compound file. The source file must contain either _VBA_PROJECT_CUR or VBAProject streams

Syntax

function LoadVBAProjectFromFile(FileName: WideString): Integer;

Remarks

Returns 1 when the payload is loaded; returns a negative value if the file cannot be opened or does not contain a recognised VBA storage

See also

if Workbook.LoadVBAProjectFromFile('C:\Reports\MacroPayload.ole') = 1 then
  Workbook.SaveAs('C:\Reports\MacroWorkbook.xls', xlExcel97);

See also