I want to use Word to get at some data stored in an Access 97 Jet database. I bet there’s a lot of overhead opening Access to get the data and I’m wondering if I use an ADO connection string (instead of DAO), will this mean I’m not really opening Access and therefore mean lower overhead/faster access? I’m running Office 97, but am willing to upgrade if ADO will give me better performance in this scenario.
Many thanks,
Gwenda
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Access automation with Word (Access97->XP)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Access automation with Word (Access97->XP)
- This topic has 7 replies, 3 voices, and was last updated 22 years, 4 months ago.
AuthorTopicWSgellwood
AskWoody LoungerJanuary 8, 2003 at 8:12 pm #381563Viewing 1 reply threadAuthorReplies-
WBell
AskWoody_MVPJanuary 8, 2003 at 8:19 pm #643611Hi Gwenda,
DDE is slow, but you could try using an ODBC data source – they are a fair bit quicker. ADO and Access97 don’t provide much capability, and I’m not sure how you would even force the use of ADO using Word Mail Merges. On the other hand, Office XP and its OLE DB data source are quicker than either. Unfortunately there are some issues with security and the Word mail merge. Just to clarify, I presume you are driving the automation from the Access database, but running the merge in Word. If that’s not what you are doing, explain and I’ll do my best to help. -
WSgellwood
AskWoody LoungerJanuary 8, 2003 at 8:40 pm #643623Dearest lightning-fast Wendell,
I’m not doing a mail merge. I have VBA code in a Word template that needs to open a parameters table in Access to get the name of the writer, business name, and a bunch of other stuff that gets plugged into the letter. The data is stored in Access as part of a larger Access application. I’ll just open the recordset once, grab the data I need and load it into variables, close the recordset and go on with my processing in Word.From your message, I judge that I should perhaps try an ODBC data source (I know that DDE stands for Dynamic Data Exchange, but I don’t know what it means). Or do you think I should upgrade to Office XP?
Thanks again,
Gwenda -
WBell
AskWoody_MVPJanuary 8, 2003 at 8:49 pm #643645ARGH! I’m so fast I assumed you were doing Mail Merges. Yes, where you are doing an automated generation of a document in Word, you are not doing DDE stuff, so it isn’t terribly sluggish when compared to Mail Merges. Actually, I don’t think you will get much of a speed boost using ADO as compared to DAO. Are you doing a one-off creating of a single document, or are you doing a multi-record document? We found that in doing a 600 page Word document based on about 4000 records of data, the automation solution created something that looked identical to a Word catalog style Mail Merge, and took less than 25% of the time. In that case we were using DAO and ODBC linked SQL Server tables. From your description, I gather you are going the other way and loading Access data into Word using VBA in Word – is that correct?
-
-
WScarbonnb
AskWoody LoungerJanuary 8, 2003 at 8:58 pm #643646Gwenda,
If you use DAO (or ADO for that matter), you aren’t actually opening Access to get at your data. You are just using the Jet Engine.
All you have to do is set a reference, in Word, to Microsoft DAO 3.51 Object Library and Use code like this to access the data:
Dim db As Database
Dim strSQL As String
Dim rst As Recordset‘Open database
Set db = OpenDatabase(“C:fullpathtoyourdatabasefile.mdb”)
strSQL = “SELECT * FROM tblContact”
‘Open Recordset
Set rst = db.OpenRecordset(strSQL)
‘Loop through the recordset
Do While Not (rst.EOF)
With Selection
.InsertAfter rst.Fields(1)
.InsertParagraphAfter
End With
rst.MoveNext
Loop‘Close and release pointers
rst.Close
Set rst = Nothing
db.Close
Set db = Nothing-
WSgellwood
AskWoody Lounger -
WBell
AskWoody_MVPJanuary 9, 2003 at 11:36 am #643772Thinking about your performance question while I was out, the real issue doing a one-off document is that you have to start the Jet database engine each time. You might get a significant speed boost by migrating to 2000 or 2002 and using the Desktop Engine, which is really SQL Server in disguise. It runs as a background task or service, and would thus not require starting up. It does also have some inherent speed advantage in returning data, but that would likely be in the noise level, for what it’s worth. Have a good day.
-
WSgellwood
AskWoody Lounger
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
2 hours, 15 minutes ago -
False error message from eMClient
by
WSSebastian42
6 hours, 53 minutes ago -
Awoke to a rebooted Mac (crashed?)
by
rebop2020
5 hours, 10 minutes ago -
Office 2021 Perpetual for Mac
by
rebop2020
6 hours, 22 minutes ago -
AutoSave is for Microsoft, not for you
by
Will Fastie
58 minutes ago -
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
9 hours, 54 minutes ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
10 hours, 16 minutes ago -
Outdated Laptop
by
jdamkeene
15 hours, 19 minutes ago -
Updating Keepass2Android
by
CBFPD-Chief115
20 hours, 44 minutes ago -
Another big Microsoft layoff
by
Charlie
20 hours, 24 minutes ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
55 minutes ago -
May 2025 updates are out
by
Susan Bradley
47 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
1 day, 2 hours ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
1 day, 2 hours ago -
Drivers suggested via Windows Update
by
Tex265
1 day, 2 hours ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
1 day ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
1 day, 9 hours ago -
Apple releases 18.5
by
Susan Bradley
1 day, 3 hours ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
1 day, 10 hours ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
1 day, 11 hours ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
18 hours, 40 minutes ago -
No HP software folders
by
fpefpe
1 day, 19 hours ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
16 hours, 24 minutes ago -
Stay connected anywhere
by
Peter Deegan
2 days ago -
Copilot, under the table
by
Will Fastie
2 hours, 53 minutes ago -
The Windows experience
by
Will Fastie
2 days, 6 hours ago -
A tale of two operating systems
by
Susan Bradley
10 hours, 55 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
2 days, 12 hours ago -
Where’s the cache today?
by
Up2you2
3 days, 3 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
2 days, 20 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.