#1
|
|||
|
|||
importing Access data to a Word document
In the past I have created document templates that drew data from an MS Access database. Now, using Word 2010 and Access 2010, I cannot open the database to draw out the data. I get error messages - either the database cannot be found or the file format is invalid. The old templates connected to an "mdb" database using code like this: var1 = "SELECT * FROM Lawyer WHERE [LawyerName] = Wayne Cusack" & Chr(34) & var1 & Chr(34) & "ORDER BY Ordernumber;" Set db = OpenDatabase(Name:="C:\Work Matters\Databases\Lawyer.mdb") Set rs = db.OpenRecordset(var1) I understand that the default Access file type has changed from "mdb" to "accdb". When I save the new database with an "accdb" extension I get the message saying it is invalid - if I leave off the extension or use "mdb" I get a message saying the file cannot be found. I have tried using "Save As" under the "Save And Publish menu to store the database in an older format, but that does not solve the problem. How can I connect to the database to draw out data to be used in a Word template? |
#2
|
|||
|
|||
|
#3
|
|||
|
|||
Thank you Greg. You've helped me to solve the problem.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Importing paragraph from another Word document using VBA | mawallace | Word VBA | 2 | 06-05-2012 05:32 AM |
Importing data in PDF into Powerpoint | HowardC | PowerPoint | 2 | 03-14-2012 11:21 AM |
Importing Selected Text Into Word Document | Mooseman60 | Word | 1 | 10-06-2011 03:18 AM |
Protecting Word Document by restricting access permissions! | user | Word | 0 | 11-20-2008 01:21 PM |
Can I fill in Word document from Access table and/or query? | slim_jim_56 | Word Tables | 0 | 10-03-2007 01:59 PM |