妈的,研究了一个晚上,终于搞定了。
代码如下:
'开始别忘了导入这两个东东
'导入Word类库
Imports Microsoft.Office.Core
Imports Word
Public Class Form1
'提取过程
Sub FuckWord()
'定义Word程序
Dim oWordApplic As Word.Application = New Word.Application
'定义文档
Dim oDocument As Word.Document
'定义区域
'Dim oRange As Word.Range
'定义文件路径
Dim WordFilePath As String = "D:\客观题.doc"
'默认的参数
Dim isReadOnly As Boolean = False '只读
Dim isVisible As Boolean = True '程序是否可见
Dim missing = System.Reflection.Missing.Value
'打开Word文档
oDocument = oWordApplic.Documents.Open(WordFilePath, missing, isReadOnly, missing, missing, missing, missing, missing, missing, missing, missing, isVisible, missing, missing, missing, missing)
'激活程序
o