Problem : MS Publisher “The Clipboard is Busy”

Problem : MS Publisher “The Clipboard is Busy”

Error:
MS Publisher reports error -2147221040
The clipboard is busy, MS Publisher can not copy, cut, paste because another program is using the clipboard

Problem:
I’ve written a macro that copies a range of shapes from one document to another in order to simulate copying a page between documents.  When this macro runs in a loop (10 – 15 iterations), I frequently receive the error cited above.  I can run the macro, receive the error, and when I click OK on the error dialog, the macro continues and copies subsequent pages.

Often, after deleting the pages and re-running the macro, it will run perfectly.   Note that the shapes being copied include an image (800 x 600 jpg).

Environment:
Vista, Publisher 2007

When I run the macro, three publisher documents are open, but no other programs are loaded.


Solution: MS Publisher “The Clipboard is Busy”

Sorry it took so long to get back to you… I got a little swamped for a few days.

I’m not as up as I should be on the code you’re trying in order to help you to the degree that you need to be helped.  I mean I could be, if I could find the time, but I can’t.  So if we can stay with generalizations, I might at least be able to spark some notion in you which could get you there…

…and the question I have which may do just that is this:  After you’ve pasted something, is there any way to verify, using code, that said pasting succeeded before moving onto the next copy-and-paste?

If so, then that would be better than timers.  With timers, you’re just guessing… operating in the blind… hoping the end-user’s machine on which the code may run will be as fast as yours, or have as much RAM (or have a little in it)… that sort of thing.  But when you can perform a task with code, then verify that it happened before moving on to the next task (and have a plan “B” piece of code if the verification fails), then it doesn’t matter how fast the code runs, or well the machine is able to keep up with whatever are the tasks.