![]() |
Copy from Word on clipboard
Hi everybody,
I have made a routine where a worddocument is copied and pasted in an Excel Sheet. When it´s pasted I will close down the copied selection on clip board and close down Word. i can´t clear the clipboard from the wordcopy and of that reason it´s not possible to close down the Word Application (there is a question if the clipboard copy should be saved). In Excel I use "Application.CutCopyMode = False" but it does not work in this case. Thanks in advance for any answer how I could solve this problem. Best Regards Mats -- ESI Update |
Copy from Word on clipboard
Mats Nilsson:
try, EmptyClipboard Api Function e.g. Private Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function CloseClipboard Lib "user32" () As Long Private Declare Function EmptyClipboard Lib "user32" () As Long Public Sub JustEmptyClipboard() OpenClipboard (0) EmptyClipboard CloseClipboard End Sub -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Mats Nilsson" wrote: Hi everybody, I have made a routine where a worddocument is copied and pasted in an Excel Sheet. When it´s pasted I will close down the copied selection on clip board and close down Word. i can´t clear the clipboard from the wordcopy and of that reason it´s not possible to close down the Word Application (there is a question if the clipboard copy should be saved). In Excel I use "Application.CutCopyMode = False" but it does not work in this case. Thanks in advance for any answer how I could solve this problem. Best Regards Mats -- ESI Update |
Copy from Word on clipboard
In your routine, insert a line like
wdApp.DisplayAlerts = False before closing the file and quitting Word, which should suppress the warning message. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "Mats Nilsson" wrote in message ... Hi everybody, I have made a routine where a worddocument is copied and pasted in an Excel Sheet. When its pasted I will close down the copied selection on clip board and close down Word. i cant clear the clipboard from the wordcopy and of that reason its not possible to close down the Word Application (there is a question if the clipboard copy should be saved). In Excel I use "Application.CutCopyMode = False" but it does not work in this case. Thanks in advance for any answer how I could solve this problem. Best Regards Mats -- ESI Update |
All times are GMT +1. The time now is 10:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com