Automation not initialised

RomRom Member Posts: 64
Hi,

hopefully i have a small problem.

I have this Automation: 'Microsoft XML, v6.0'.DOMDocument

If i start the Codeunit, i got the message, that there is not instance of the automation.

I create the instance in the following way:
IF NOT ISCLEAR(lAuXmlDoc) THEN
  IF NOT CREATE(lAuXmlDoc) THEN
    error('No Instance');

At this part, i got the error:
IF NOT ISCLEAR(lAuXmlDoc) THEN
  IF NOT CREATE(lAuXmlDoc) THEN
    error('No Instance');
lAuXmlDoc.async := FALSE; // Error
lAuXmlDoc.load('C:\header.xml');


If i debug the code the debugger say that the automation is initialised...

Does anybody have an idea, why i get this message?

Thanks!

greetings
rom

Comments

  • manluemanlue Member Posts: 30
    Hi,

    I would think your coding has to be changed a little:
    IF ISCLEAR(lAuXmlDoc) THEN
      IF NOT CREATE(lAuXmlDoc) THEN
        error('No Instance');
    

    Creation of Automation has to be done if it is clear I think.
Sign In or Register to comment.