6 Replies Latest reply: May 4, 2012 11:06 AM by Jagan Nalla RSS

    Macro Error

    Srikanth P

      Hi Folks,


      I created the macro to Store the Table chart Data into QVD. But it gone to error.


      Please find the below piece of Script.


      sub ExpQVD

      set obj = ActiveDocument.GetSheetObject("CH01")

      set v=ActiveDocument.Variables("vQVDPath")

      set va=v.GetContent

      set QVDPath=va.String

      set QVDFile= QVDPath & "\armorcheckreport.qvd"

      obj.ExportEx QVDFile, 4

      End Sub


      I got Error: Object required: '[string: "qvdata"]'


      Please help me.



      Thanks & Regards,


        • Macro Error
          Jonathan Dienst



          It looks like QVDPath is a string, then the statement


          set QVDPath = va.String


          should be


          QVDPath = va.String


          The same with set QVDFile. In VB, the set statement is used only for objects, not standard data types.


          Hope that helps


            • Macro Error
              Jagan Nalla



              Use below code:

              sub ExpQVD


              set obj = ActiveDocument.GetSheetObject("CH03")


              set v=ActiveDocument.Variables("vQVDPath")


              obj.ExportEx v.GetContent.String&"\armorcheckreport"&".qvd",4


              End Sub


              -Make sure your path should look in variable vQVDPath like this.. D:\Work or D:\Work\Test or D:\Work\Test\File

              - And also make sure in Edit module  Module security as System Access and Current local security as Allow System Access

              - And also your straight table id is CH03


              hope it helps you