in access: from word to access? 
Author Message
 in access: from word to access?

Hi,

Is it possible with a VBA in access 2000, to import data from a table in
word 2000? I can do it from a textfile, but with word, i always get the
error: can't find ISAM file. Can a word doc (just like a txt file) be
considered as a "database"?
(no problem with Norton Anti virus).

My code:

Dim db As Database
Dim rst As DAO.Recordset

  Set db = OpenDatabase("c:\word", False, False, "word 2000;")
  Set rst = db.OpenRecordset("Select auto_id, kl From auto")
  ...

I also tried with "word 2000;" and even "word 9.0;".

thanks
ad



Thu, 18 Sep 2003 16:03:06 GMT  
 in access: from word to access?
ad wrote

Quote:
>Can a word doc (just like a txt file) be
>considered as a "database"?

Sorry, nope. You'll have to use Automation to open an instance of
Word, load the document, and then use the Selection object to retrieve
the text you want.

  -- Dev



Sat, 20 Sep 2003 05:31:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Access to Word to Access to E-mail

2. move between Access and Word, back to Access, Close word

3. Object reference back to Access from Word stored in Access

4. Access-Error printing Word Document from Access

5. Duplex Word doc with Access Report from Access

6. Cannot access VBE from within Word: access not trusted

7. Access Access-Objects from Word ?

8. accessing data in word from access database

9. Word accessing unlicensed Access tables

10. Using Find in a Word document from Access freezes Access

11. accessing/updating Access table with Word VBA

12. Access to Access objects from Word

 

 
Powered by phpBB® Forum Software