Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method Add of object Validation Failed - please help Shokie Excel Worksheet Functions 1 July 10th 09 01:33 PM
Method 'Copy' of object'_Worksheet failed q2w3e4r Excel Worksheet Functions 1 February 7th 07 01:17 PM
Calculation Method Failed Martiin Excel Programming 2 December 1st 03 01:37 PM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM


All times are GMT +1. The time now is 04:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"