4 Replies Latest reply: Jan 15, 2016 4:04 AM by Peter Cammaert RSS

    How to create Word document report using Qlikview

    Sandeep sharma



      I am using Qlikview 11 and want to create a Word document report for QlikView Charts objects using Marcos.

      I have Office 2016 installed my machine.

      Below is my sample Macro but it failed to create "Word.Application".


      sub Export_to_Microsoft_Word   

      On Error Resume Next

      set objWord = CreateObject("Word.Application")


      objWord.visible = false

      set objDoc=objWord.Documents.add

      Const wdOrientLandscape = 1

      'setting the orientation for MS Word

      objDoc.PageSetup.Orientation = wdOrientLandscape

      'instructing the Macro to copy the Table object(TB01)

      ActiveDocument.GetSheetObject("SH25").CopyTableToClipboard true


      'Instructing the Macro to save the file in a particular location

      objDoc.SaveAs "C:\QlikViewWordReport"

      'instructing the Macro to copy the Chart object(CHO1)



      objDoc.SaveAs "C:\QlikViewWordReport"



      'handle the error

          If Err.Number <> 0 Then

             'the error handler is now active

             MsgBox "Error #" & CStr(Err.Number) & " " & Err.Description, vbCritical, "Error"

          End If

      end sub


      It gives objWord object blank.


      Please help....