Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro ServerSideExportEx-bmp Error

Hi,

I created the following macro to store sheets oobject in bmp format:

Sub ExpBmp

for j = 0 to ActiveDocument.noOfSheets-1

  set ss= ActiveDocument.GetSheet(j)

  ActiveDocument.Sheets(j).Activate

  ActiveDocument.GetApplication.WaitForIdle

  for i = 0 to ss.NoOfSheetObjects-1

    set tb = ActiveDocument.GetSheetObject("CH01")

  tb.ServerSideExportEx "C:\"&i&".bmp" , ";" , 2 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF

  next

next

End Sub

but I have this error message: Object required: 'tb'

Does anyone have any suggestions?


Thanks


Giulia

1 Reply
Not applicable
Author

sorry

the correct code is

Sub ExpBmp

for j = 0 to ActiveDocument.noOfSheets-1

  set ss= ActiveDocument.GetSheet(j)

  ActiveDocument.Sheets(j).Activate

  ActiveDocument.GetApplication.WaitForIdle

  for i = 0 to ss.NoOfSheetObjects-1

      set tb = ActiveDocument.GetSheetObject(i)

       tb.ServerSideExportEx "C:\"&i&".bmp" , ";" ,2 '0=HTML, 1=Text, 2=Bitmap, 3=XML, 4=QVD, 5=BIFF

  next

next

End Sub