This is an extension to the question I asked here:
Get text from clipboard using GetText – avoid error on empty clipboard
The answer to that question worked fine for avoiding errors with an empty clipboard, but now I find I also have to handle a clipboard that contains only a graphic and no text, and this condition gets past the empty clipboard filter.
So, how can I abort the procedure when there’s only a graphic and no text on the clipboard?
Well, it took a while, but here’s how to do it.
Just to restate the problem, I want to extract text from the clipboard using DataObject.GetFromClipboard, with error trapping set to Break on All Errors, and without throwing an error when there’s no text found on the clipboard.