1 Reply Latest reply: Oct 30, 2015 10:59 AM by Robert Dolezych RSS

    How to export a table using macro embeded in the script

    Robert Dolezych

      Hallo Community!

      What is wrong with the process?

      Macro:

      Function ExTB()
      dim ex
      set ex = ActiveDocument.GetSheetObject("TB01")
      ex.ExportHTML "C:\EntwicklungTests\TB01.html"
      end Function

      Script:

      LOAD DRG_Code, DRG_Typ, DRG_Bezeichnung, DRG_Partition
      FROM [C:\temp\DRGKatalog*.qvd] (qvd);
      let ExTB = ExTB();


      I am not getting an error message, but it does not work.


      I have tried somthing like follows too:

      Macro:
      Sub TBex
      set ex = ActiveDocument.GetSheetObject("TB01")
      ex.ExportBiff "C:\EntwicklungTests\TB01.xls"
      end Sub

      Script:
      LOAD
      DRG_Code, DRG_Typ, DRG_Bezeichnung, DRG_Partition
      FROM [C:\temp\DRGKatalog*.qvd] (qvd);

      call TBex();

      Than I am getting the message:
      Fehler in Skriptzeile: (error in the script line)

      call TBex()

       

      I am perplexed because the both macros are working perfectly, when testing in the macro editor and I suppose the question is solved many times but I did not find the right thread.