回复 1# usbiz - '&cls&@echo off&cscript -nologo -e:vbscript %~fs0 & exit /b
- CopyWordToClipboard("D:\test.doc")
- Sub CopyWordToClipboard(DocumentName)
- Dim objWord,objDoc,objSelection
- Set objWord = CreateObject("Word.Application")
- objWord.Visible = False
- Set objDoc = objWord.Documents.Open(DocumentName)
- Set objSelection = objWord.Selection
- objSelection.WholeStory
- objSelection.Copy
- objDoc.Close
- objWord.Quit
- Set objSelection = Nothing
- Set objWord = Nothing
- End Sub
复制代码
|