2021年4月1日星期四

Clear Office Clipboard from within Excel

I have a file that copies 10+ charts from Excel and pastes them into an existing PowerPoint file. I am encountering errors at random places relating to copying and pasting. From the research I've done, it appears my issue is related to the office clipboard, so I am trying to add some code that will clear the clipboard. I've tried many suggested solutions and the only one that works for me is the solution suggested by EVR, but I don't know how to call it for use in another Sub.

https://stackoverflow.com/revisions/64946949/2

Currently I have it sitting in its own module and when I try to Call EvRClearOfficeClipBoard from a Sub in another module I get the following error...

Run-time error '424': Object required relating to this line of the code: "AccessibleChildren cmnB, Choose(j, 0, 3, 0, 3, 0, 3, 1), 1, cmnB, 1"

Again, it works perfectly (clears the clipboard) when I run it on it's own, but I get an error when I try to call it from another Sub in another module of the same file.

Thank you

https://stackoverflow.com/questions/66913299/clear-office-clipboard-from-within-excel April 02, 2021 at 09:05AM

没有评论:

发表评论