When open CorelDRAW X6 appears a script error during loading of my docker

when loading the script the mistake at the appeal to a VBA code.

Example,

var doc = window.external.Application;
 var presetScript = doc.GMSManager.RunMacro("PGDocker", "Macros.selectObj");

if to close the docker than to open it — error  not appears. All working good.

I think this problem appears in a moment when a script addresses a VBA Code.

how to solve a problem?