Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copypicture method failed
Hi Guys,
I am dropping excel sheets to powerpoint. i am using copypicture method of range and then paste to the powerpoint like. prmRange.CopyPicture Appearance:=xlScreen, _ Format:=xlPicture PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex PPSlide.Shapes.PasteSpecial.Select Sometimes copypicture method gives me error as something like "Copypicture method failed".Sometimes it works fine. Looking forward for a reply. Thanks, Kamal |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copypicture method failed
Kamal,
I remember this used to drive me nuts in excel 97 pasting into word documents, but I haven't tried running anything similar on more recent versions. Inexplicable failure somewhere during a big loop, sometimes, just when you were running out of time kind of thing. Very annoying, especially when you know there is nothing wrong with the code. Best hope would probably be to add a line before the copypicture command application.CutCopyMode=false which theoretically clears the clipboard. Other than that, I never found a solution, but you could also try an on error handler that also has the cutcopymode = false statement and then attempts to resume at the same place before the copy. Robin Hammond www.enhanceddatasystems.com "Kamal" wrote in message ... Hi Guys, I am dropping excel sheets to powerpoint. i am using copypicture method of range and then paste to the powerpoint like. prmRange.CopyPicture Appearance:=xlScreen, _ Format:=xlPicture PPApp.ActiveWindow.View.GotoSlide PPSlide.SlideIndex PPSlide.Shapes.PasteSpecial.Select Sometimes copypicture method gives me error as something like "Copypicture method failed".Sometimes it works fine. Looking forward for a reply. Thanks, Kamal |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copypicture method failed
Hi Robin
Thanks man! I had gone crazy over this problem .I had pasted the line application.CutCopyMode=false before i got ur message But unexpectedly it was still giving me error .then i catch the error in error handler as you told in your mail and resume the same copy statement though it came to the error handler but on resuming it called copy statement again and it worked .This really seems to be a weird problem with no full proof solution but main aim is to make things work and it did Thanks a lot Kama ----- Robin Hammond wrote: ---- Kamal I remember this used to drive me nuts in excel 97 pasting into wor documents, but I haven't tried running anything similar on more recen versions. Inexplicable failure somewhere during a big loop, sometimes, jus when you were running out of time kind of thing. Very annoying, especiall when you know there is nothing wrong with the code Best hope would probably be to add a line before the copypicture comman application.CutCopyMode=fals which theoretically clears the clipboard Other than that, I never found a solution, but you could also try an o error handler that also has the cutcopymode = false statement and the attempts to resume at the same place before the copy Robin Hammon www.enhanceddatasystems.co "Kamal" wrote in messag .. Hi Guys I am dropping excel sheets to powerpoint i am using copypicture method of range and then paste t the powerpoint like prmRange.CopyPicture Appearance:=xlScreen, Format:=xlPictur PPApp.ActiveWindow.View.GotoSlid PPSlide.SlideInde PPSlide.Shapes.PasteSpecial.Selec Sometimes copypicture method gives me error as somethin like "Copypicture method failed".Sometimes it works fine Looking forward for a reply Thanks Kama |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Method Add of object Validation Failed - please help | New Users to Excel | |||
Method Add of object Validation Failed - please help | Excel Worksheet Functions | |||
Method 'Copy' of object'_Worksheet failed | Excel Worksheet Functions | |||
Calculation Method Failed | Excel Programming | |||
Method ~ of Object ~ Failed. | Excel Programming |