Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Mail Merge displaying confirm Data Source Dialog

Posted on 2010-09-03
9
Medium Priority
?
793 Views
Last Modified: 2013-11-28
Here's my code for mailmerge- Access 2000 and word 2000

strTestDrive = "Select ID,'MR. ' + Trim(FullName),Address1 as Address1,Address2,Trim(City + chr(44) + State) as CS,Zip FROM TestDrive"
  Set wrdapp = CreateObject("Word.Application")
  Set worddoc1 = wrdapp.Documents.Add(Template:=myTemplate1, NewTemplate:=False, DocumentType:=0)
    worddoc1.MailMerge.OpenDataSource Name:="\\folder\GROUP\\Lunch.mdb", _
     LinkToSource:=True, Connection:="TABLE TestDrive", SQLStatement:=strTestDrive
     worddoc1.MailMerge.Destination = wdSendToNewDocument
     worddoc1.MailMerge.Execute
     worddoc1.AttachedTemplate.Saved = True
    worddoc1.Close False

My question is the 'confirm data source dialog box appears as well as the question to select the Table. Is there a way to automate this without the annoying prompts. I expect users not to see those needless prompts.
0
Comment
Question by:zachvaldez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:YohanF
ID: 33598386
did you try by setting "docmd.SetWarnings False" before you start the code and "docmd.SetWarnings True" at the end of the code ? I'm not 100% sure whether this might work in this instance, but you could try.

The other option is to make the security features in word to be very open, because as far as I understand this is a security prompt from word rather than access. So if no security at word level this may work like a baby, BUT IT MAY open up other loopholes in terms of macro viruses etc etc...
0
 
LVL 13

Assisted Solution

by:lucas911
lucas911 earned 800 total points
ID: 33598811
change this line
LinkToSource:=True, Connection:="TABLE TestDrive", SQLStatement:=strTestDrive
to
LinkToSource:=True, Connection:="TABLE TestDrive", SQLStatement:=strTestDrive, subtype:=3
0
 

Author Comment

by:zachvaldez
ID: 33599216
Unfortunately,the set warning to false does not change it.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:zachvaldez
ID: 33599234
subtype:=3>>> getting error named argument not found. im using word 2000 already
0
 
LVL 13

Expert Comment

by:lucas911
ID: 33599674
0
 

Author Comment

by:zachvaldez
ID: 33600124
good article but then the subtype  argument does not apply to my version of word
0
 
LVL 13

Accepted Solution

by:
lucas911 earned 800 total points
ID: 33600202
how bout this?

http://support.microsoft.com/kb/209976

i know there was an issue if it was ms access 2003 and ms word 2000.
0
 
LVL 16

Assisted Solution

by:Sheils
Sheils earned 200 total points
ID: 33600934
I have been using the "Super Easy Word Merge" from Albelt Kallal website for ages without any hassle. Give it a try:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

0
 
LVL 6

Expert Comment

by:YohanF
ID: 33609530
By the way this may not be the best way to do it, why dont you create a report from Access to do what you have to do and then open it up. It may not suit you, if so please ignore my comment.

I had a similar issue as well and I opted to creating a report and exporting to PDF (in 2007 that feature is build in, but not sure for your version - if not use a printer like BullZip PDF printer). This way my application was movable to any user without having to make sure all the word documents exists for them.

Have a think about!
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question