![]() |
Excel Clipboard Problems
Office 97 sr2
I have an application that copies excel ranges (that often contain charts) and pastes them inline into word using the 'Picture' format (wdPasteMetafilePicture). This process generates a 4605 error "This method or property is not available because the Clipboard is empty or not valid." with some frequency. * Both excel and word are invisible when the process runs * Both applications have had alerts disabled * I am using the 'OpenClipboard' API to lock the clipboard immediately after copying from excel * I am using the 'CloseClipboard' API to unlock it just before pasting into word * I am setting CutCopyMode = False after completing the paste operation in word * I am clearing the clipboard after the paste operation using the clear method of VB's clipboard object * I am losing my mind While debugging I have noticed that other applications (such as wordpad) have the paste option ghosted, however I can paste the data back into excel. Therefore it seems that excel has it's own clipboard and that this clipboard does not always communicate well with the windows clipboard. It also seems to me that this is some sort of resource issue because it is not consistent and seems to happen more when the machine (nt4 terminal-server) is under load. Does anybody know why this happens? What can I do to fix it? Would I have better reliability if I were use 'CopyPicture' insetad of the standard copy method? Thanks very much -Brian |
All times are GMT +1. The time now is 06:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com