Dim WordApp As word.Application
Dim NewWord As word.Document
Private Sub Command1_Click()
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = False
Set NewWord = WordApp.Documents.Open(App.Path + "\3.doc")
WordApp.Selection.WholeStory
Text1.Text = WordApp.Selection.Text'将WORD文档中的字符读入TEXTBOX控件中
WordApp.Quit
End Sub
请注意,上面的例子只能读取WORD文档中的文字和符号,而不能读取WORD文档中的表格或图片。
===================================================
讨厌C#的行尾的小尾巴;和一对大括号{ }
===================================================