Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
Could you be so nice and post the whole example. i tried similar but it does not work.
Thank you in advance.
M