Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2011, 02:47 PM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Access 2007 mail merger Data Source not found on Windows 7 machine.

I have been using the code below to mail merge data in my Access 2007 database to a word 2007 documnet for a few years now without any issue. A few of uor computers now have Windows 7 and whenever the mailmerge runs it says it cannot find the temp table in Access holding the data and brings up a data source selection box which does not show the data base. The Mail merge is started in Access and has work great in XP. Any Ideas as to why this would be happening.


' MsgBox strCriteria
Set objWord = GetObject(strFilePath, "Word.document")
objWord.MailMerge.Execute
objWord.Application.Visible = True

objWord.Close

Access is open during the mail merge process.


Steve
 
Old May 2nd, 2011, 04:30 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Steve,

Merging with an Access table has many issue. For instance Word has to open another instance of Access to perform the merge. This cause Access to get loaded twice.

I have found it best to avoid ever letting Word use an Access database as a merge source. Instead I export the data from Access to a Word merge document. Have Word use this as the merge source. I have not ever had any issue with this method with any Word, Access and Windows version combination.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old June 20th, 2011, 11:51 AM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

This has help greatly.
 
Old June 20th, 2011, 01:45 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

You're welcome.

Good luck with your project.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
Just Trying Simple in Access 2007 (Windows 7) wonesor Access VBA 4 January 15th, 2011 07:45 PM
Data source name not found and no default driver s Durkee VB.NET 2002/2003 Basics 0 September 21st, 2007 01:11 PM
Removing a machine data source hamffjs Access 3 August 21st, 2006 10:03 AM
err 2580 - data source not found DavidCC SQL Server 2000 4 April 1st, 2004 03:19 PM
Error: Data source name not found and no default d Justine Classic ASP Professional 1 January 23rd, 2004 11:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.