操作word
Dim app As New MSWord.Application
try
Dim fileName = "d:\test.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)
App.Visible = True
catch ex As exception
msgbox(ex.message)
app.Quit
finally
'app.Quit
End try
参考 http://msdn.microsoft.com/zh-cn/library/tcyt0y1f%28v=vs.80%29.aspx