R
Ronny
Why doesn't this work:
Dim WordApp As Object
Dim WordDoc As Object
Dim strActiveDoc As String
Set WordDoc = WordApp.Documents.Open(strDocName)
Dim sqlPers As String
Dim dbs As ADODB.Connection
Set dbs = Application.CurrentProject.Connection
sqlPers = "INSERT INTO Historikk VALUES WordDoc "
dbs.Execute sqlPers
dbs.Close
This works:
sqlPers = "INSERT INTO Historikk VALUES ('Testing') "
I want't the open document name of Word to be inserted
into a table. The I keep record of which documents were
printed .
Dim WordApp As Object
Dim WordDoc As Object
Dim strActiveDoc As String
Set WordDoc = WordApp.Documents.Open(strDocName)
Dim sqlPers As String
Dim dbs As ADODB.Connection
Set dbs = Application.CurrentProject.Connection
sqlPers = "INSERT INTO Historikk VALUES WordDoc "
dbs.Execute sqlPers
dbs.Close
This works:
sqlPers = "INSERT INTO Historikk VALUES ('Testing') "
I want't the open document name of Word to be inserted
into a table. The I keep record of which documents were
printed .