Home › Forums › General XMetaL Discussion › Can’t Preview – On_Before_Document_Preview popsup › Reply To: Can’t Preview – On_Before_Document_Preview popsup
Reply to: Can’t Preview – On_Before_Document_Preview popsup
May 20, 2009 at 8:33 pmI've never seen this particular error, so I'm not sure what it might mean. However, if the error is actually “Automation server can't create object” then the script that is attempting to run most likely references an ActiveX control that is either not installed or not registered properly as a COM object.
Note that when an ActiveX control is called from script the filename itself is not referenced in the script but instead the name the control registered itself with Windows is used. This will make it tricky to figure out which OCX or DLL file is missing / not registered.
The easiest way to figure out what the problem is would be to contact the person that originally created the MCR file(s) included with your customization (there might be more than one MCR) to find out if they can debug it for you.
If you can locate the MCR file that contains the macro event in question then you can have a look at line 38 (or maybe nearby) to see what it is trying to do. Hopefully it is your document level customization, in which case the name of the MCR would match the name of your DTD. If it is an application level macro it might be xmetal.mcr, macros.mcr or a file located inside the Startup folder.
However if you are not familiar with creating XMetaL customizations, or not familiar with the scripting language used, that might not be easy. You will also need a tool that lets you check which ActiveX controls are registered as COM objects in order to match up the registered name used in the script with the actual DLL or OCX that needs registering.