Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

CopyBitmapToClipboard from non-active sheet problem

Hi guys,

I'm developing a macro for transferring charts from Qv to PPoint. Everything works perfectly well with the function CopyBitmapToClipboard on a sheet object unless I try to copy the bitmap from the object on a non-active sheet.

So, CopyBitmapToClipboard successfully copies the object bitmap to clipboard and returns TRUE only for the objects on an active sheet. For the objects on any other sheet the function returns FALSE and does not change the clipboard.

All the examples that I found on the forum use the function only for the objects on the current sheet... Did anybody face this problem? Are there any solutions?

Thanks!

Valera

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

OK, the problem has been solved.

In fact, before calling the object's CopyBitmapToClipboard it is necessary to activate the sheet where the object is located and - what is more important - to wait for system idle.

It looks like this:

obj.GetSheet.Activate

ActiveDocument.GetApplication.WaitForIdle

obj.CopyBitmapToClipboard

Valera

View solution in original post

2 Replies
Anonymous
Not applicable
Author

OK, the problem has been solved.

In fact, before calling the object's CopyBitmapToClipboard it is necessary to activate the sheet where the object is located and - what is more important - to wait for system idle.

It looks like this:

obj.GetSheet.Activate

ActiveDocument.GetApplication.WaitForIdle

obj.CopyBitmapToClipboard

Valera

Not applicable
Author

Could you be so nice and post the whole example. i tried similar but it does not work.

Thank you in advance.

M