打印屏幕时出现运行时错误:4605 [英] Run Time Error:4605 when printing the screen
本文介绍了打印屏幕时出现运行时错误:4605的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我已经编写了一个宏(Word 2003)来捕获屏幕.
代码如下:
Hi All,
I have written a macro (Word 2003) to capture the screen.
Code is as below:
Sub PrintScreen()
keybd_event VK_SNAPSHOT, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0
keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0
End Sub
要将捕获的屏幕粘贴到循环下面,已写入
To paste the captured screen below loop has written
Do Until A = True
PrintScreen
Selection.Paste
Loop
当打开word文档时,此代码工作正常,但是如果在循环进行时打开浏览器,则会出现以下错误消息.
This code is working fine when the word document is opened, but if I opened browser when the loop is going on I''m getting below error message.
'Run Time Error:4605 - This method or property is not available because the clipboard empty or not valid '
有人可以帮我解决这个问题吗?
Can someone help me to solve this issue?
Thanks
推荐答案
我从未在VBA中工作过.但是我发现这个已解决的线程出现了相同的错误,请检查
运行时错误"4605":此方法或属性不可用,因为剪贴板为空或无效. [ ^ ]
&
几个相关链接针对此错误 [
I never worked in VBA. But I found this solved thread for the same error, check it
Run-time error ''4605'': This method or property is not available because the Clipboard is empty or not valid.[^]
&
couple of related links for this error[^]
这篇关于打印屏幕时出现运行时错误:4605的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文