Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in Macro script


Hi,

Can anyone please have a look on attached and when I am clicking ok the macro it is hightlighting

  Email=v.GetContent.String and showing

Object Required=v

Please can anyone let me know is there any error in macro.

37 Replies
Anonymous
Not applicable
Author

thanks.this was useful for me. i want same macro for exporting an image in excel (pivot table)

please help

marcus_sommer

Anonymous
Not applicable
Author

Here error is coming as expected identifier so can you please help ?macro.png

marcus_sommer

I wouldn't try it with a function else I would call a sub-routine. Further there is nothing to call the function and the object-variable isn't defined - why not just using something like this example from the APIGuide.qvw:

sub export

rem *** This method is not meaningful for all types of sheet objects ***

set obj = ActiveDocument.GetSheetObject("CH01")

obj.ExportBitmapToFile "MyImage.bmp"

end sub

- Marcus

Anonymous
Not applicable
Author

this error can be seen when I am using sub  routine function macroerror.png

Anonymous
Not applicable
Author

macroerror.png

Anonymous
Not applicable
Author

sir where ? can you please send me the screen shot if possible?

marcus_sommer

You need to ensure that the ID of your object is really "CH01" - that there really exists this object. Further I'm not absolutely sure if the example is complete in regard to the file-name - I would add a path and therefore using a full-path.

- Marcus