Private Sub Command2_Click()
Dim thisDoc As Document
Dim thisRange As Range
WordApp.Documents.Open (App.Path & "\test2.doc")
WordApp.Visible = False
Set thisDoc = WordApp.ActiveDocument
Set thisRange = thisDoc.Range
Text1.Text = thisRange.Text
WordApp.Quit
Set WordApp = Nothing
End Sub
請問一下,假設test2.doc其中有個欄位叫做姓名,是以
姓名:peter 性別:xxxxx 的方法表示
請問該如何做,才能取到peter(即所指定欄位內的資料,而其它的不要),多謝.......
Dim thisDoc As Document
Dim thisRange As Range
WordApp.Documents.Open (App.Path & "\test2.doc")
WordApp.Visible = False
Set thisDoc = WordApp.ActiveDocument
Set thisRange = thisDoc.Range
Text1.Text = thisRange.Text
WordApp.Quit
Set WordApp = Nothing
End Sub
請問一下,假設test2.doc其中有個欄位叫做姓名,是以
姓名:peter 性別:xxxxx 的方法表示
請問該如何做,才能取到peter(即所指定欄位內的資料,而其它的不要),多謝.......
全站熱搜
留言列表