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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Images Cannot be Displayed During Macro Execution

Dear All,

I have a straight table which has one dimension as company logos. I  want to send that table to a specific email address with a macro.

When I add a trigger to execute the macro after reload process, the embedded images cannot be present correctly.

Are there any way to stop the macro after reload for a while to make the images available and than run it again.

I use the below macro to export the snapshot of the table:

Sub Snapshot

Set obj = ActiveDocument.ActiveSheet.SheetObjects("CH27")

obj.ExportBitmapToFile "C:\\Dashboards\\Executive_Dashboard\\ExecutiveDashboard.jpg"

End Sub

Thanks for your support, best regards.

5 Replies
Anonymous
Not applicable
Author

Hi, you could try adding an: ActiveDocument.WaitForIdle and see if that allows the images to be generated before the macro continues.

Not applicable
Author

Hi Johannes,

I got below error message:

"Object doesn't support this property or method: 'ActiveDocument.WaitForIdle'"

Anonymous
Not applicable
Author

My bad, it's actually: ActiveDocument.GetApplication.WaitForIdle

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try adding these lines:

set QV =  ActiveDocument.GetApplication

QV.WaitForIdle

QV.Refresh


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

I try your suggestion but I'm still having qmem... instead of images.

I think embedded images cannot be displayed until macro execution ended.

Do you have any suggestion.

Kind Regards,

Asim Akin