操作word,比如,得到所有内容
Dim app As New MSWord.Application
try
Dim fileName = "d:\ts.doc"
app.Documents.Open(fileName)
Dim count = app.Documents(fileName).Characters.Count
Dim rng As MSWord.Range = app.Documents(fileName).Range(Start:=0, End:=count)
msgbox(rng.Text)
rng.Select() '全选
rng.Copy() '拷贝
catch ex As exception
msgbox(ex.message)
finally
app.Quit
End try
'msgbox(ClipBoard.GetText)
参考 http://msdn.microsoft.com/zh-cn/library/tcyt0y1f%28v=vs.80%29.aspx
[此贴子已经被作者于2014-4-1 17:33:39编辑过]