Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I'm in trouble with a macro that creates a PPT.
Everything WORKS fine till I select a field.
I'm going to explain my problem.
I have a sheet with a pivot table.
If I don't select a field the Macro works perfectly and create 30 PPT'S with a slide containing my pivot table.
if instead, I select a field of my cloud, the macro goes in error.
The error is in this line of code
ActiveDocument.GetSheetObject(objId).CopyBitmapToClipboard
I tried using
ActiveDocument.Sheets(1).Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetSheetObject(objId).CopyBitmapToClipboard
but if I insert these two rows I get an error in the line
ActiveDocument.GetApplication.WaitForIdle
I tried adding
ActiveDocument.GetApplication.WaitForIdle 1000
No WAY.
I tired using SLEEP
NO WAY.
So I can't use ActiveDocument.GetApplication.WaitForIdle
The strange thing is that if i put a msgbox ("HI")
just before the line
ActiveDocument.GetSheetObject(objId).CopyBitmapToClipboard
IT WORKS.
I say it again. I have this problem ONLY if i select a field. EVERY Field of my cloud.
Someone can help me
I'm going craizy.
My Qlik Version is 11.20.11643.0 IR
Thank you in advance
Best regards
Giampiero
Hi guys,
I solved the problem.
I was testing the macro using the button TEST.
Creating a button with action my Macro everything went ok.
I don't know why this happen but hope this thread can be useful to someone else.
The ActiveDocument.GetApplication.WaitForIdle command is working fine too in this way.
Thank you all
Regards
Giampiero