标题: VBS访问剪贴板的几种方法
作者: Demon
链接: http://demon.tw/programming/vbs-clipboard.html复制代码
- 用Word.Application也可以设置和获取剪贴板内容
- '设置剪切板的内容
- Dim Word
- Set Word = CreateObject("Word.Application")
- Word.Documents.Add
- Word.Selection.Text = "忘记了,喜欢一个人的感觉"
- Word.Selection.Copy
- Word.Quit False
- '获取剪切板的内容
- Dim Word
- Set Word = CreateObject("Word.Application")
- Word.Documents.Add
- Word.Selection.PasteAndFormat(wdFormatPlainText)
- Word.Selection.WholeStory
- str = Word.Selection.Text
- Word.Quit False
- WScript.Echo str
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |