A
awrex
I'm trying to tweak a MSDN Article that allows me to import data from a Word
form to a Access db.... I'm wanting to have a directory open dialog box pop
open and feel i've traveled into hositle waters on this..... Your help is
appreciated!!!
Sub GetWordData()
Dim appWord As Word.Application
Dim doc As Word.Document
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strDocName As String
Dim blnQuitWord As Boolean
Dim d As FileDialog
On Error GoTo ErrorHandling
strDocName = "C:\Documents and Settings\chavira\Desktop\CPD\" & _
InputBox("Enter the name of the Word contract " & _
"you want to import:", "Import Contract")
Set appWord = GetObject(, "Word.Application")
Set doc = appWord.Documents.Open(strDocName)
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\My Documents\" & _
"CPD Form.mdb;"
rst.Open "CPD_Table", cnn, _
adOpenKeyset, adLockOptimistic
form to a Access db.... I'm wanting to have a directory open dialog box pop
open and feel i've traveled into hositle waters on this..... Your help is
appreciated!!!
Sub GetWordData()
Dim appWord As Word.Application
Dim doc As Word.Document
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strDocName As String
Dim blnQuitWord As Boolean
Dim d As FileDialog
On Error GoTo ErrorHandling
strDocName = "C:\Documents and Settings\chavira\Desktop\CPD\" & _
InputBox("Enter the name of the Word contract " & _
"you want to import:", "Import Contract")
Set appWord = GetObject(, "Word.Application")
Set doc = appWord.Documents.Open(strDocName)
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\My Documents\" & _
"CPD Form.mdb;"
rst.Open "CPD_Table", cnn, _
adOpenKeyset, adLockOptimistic