kofbld 当前离线
上等兵
yu2n 当前离线
上尉
标题: 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复制代码
用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复制代码
TOP