Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word vba clipboard 1

Status
Not open for further replies.

eHanSolo

Technical User
May 24, 2004
260
GB
hi there,

I've got a piece of code in excel where it copies and pastes tables from different word docs in to a single word doc. I have a reference to the Word object lib.

I get to about half way and my code just stops working. the large single doc disappears when i'm debugging. I reckon it's because of the clipboard holding too many items (I think)...

Anywya, does anyone know i can clear Word's clipboard from excel?? please help! thanks!

e
 
I don't know the cause of your problem but, as far as the clipboard goes ...

There is a single Windows Clipboard which is used for all copy/paste operations.

If you have Office 2000 or later there is an Office clipboard which maintains copies of the last 12 or 24 (depending on version) items copied via the Windows clipboard. There is not a separate Word clipboard, the one Office clipboard is shared between Word and Excel (and other Office apps).

There are some facilities available via the UI for manipulation of individual entries in the Office clipboard and these can be accessed from VBA in Office 2000 (by addressing the Clipboard Toolbar) but can NOT be accessed from VBA in later versions (where the Toolbar has been replaced with a Task Pane).

The Office Clipboard is populated by trapping Windows Clipboard activity and, occasionally, there can be conflicts between Office doing this and other clipboard utilities doing the same thing.

I'm not sure whether any of this will help you but the bottom line is that you can't do much about the Office clipboard. About the only thing you can do is to artificially copy some small items to force the older large items that you copied and that have been saved to drop off the end. If memory may be an issue it can sometimes help to clear the Undo buffer (Document.UndoClear)


Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

Professional Office Developers Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top