473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Open word merge without Select Table dialog?

I am trying to open a Word merge document from Access, pulling data from an excel spreadsheet. Got it working (thanks to help from this forum!) except for one thing. When the Word document opens, it asks me to select a table, even though I've specified a Connection string. I create this excel file new each time my process runs, so I don't believe I can specify a range. Is there anyway around user input on this? Here is some of my applicable code.

Expand|Select|Wrap|Line Numbers
  1. With oMainDoc.MailMerge
  2.  
  3.     oMainDoc.MailMerge.OpenDataSource Name:="K:\common\lease documents\new lease info.xls", _
  4.     Connection:="Select_Driver_Lease_ALT"
  5.     .Destination = wdSendToNewDocument
  6.     .Execute
  7.     End With
Any help would be great. Thanks!
Jody
Apr 4 '07 #1
1 2117
NeoPa
32,556 Expert Mod 16PB
I can't help here Jody I'm afraid.
This seems to require knowledge of the programming objects for MS Word and this is an Access forum. I appreciate that there is no MS Word forum here so this is probably the most appropriate place to post it, but don't expect too much from us Access hacks. I do understand you're coding from within Access, but the question is about the MS Word object system.
Apr 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Picho | last post by:
Hi all, I have a problem automating word (office xp). I am trying to create a mailmerge datasource using this code: object oFieldsVector = (object)fieldsVector; object oFileName =...
0
by: Bud Zielinski | last post by:
Some of our users have converted to Office 2003. Our Access app is in 2000. they run it in Access 2003 with Access 2000 as the default file format. When doing a merge from the partial code...
3
by: di | last post by:
I have a Access Database, and I would like to create a word document that (preferable would filter)links to ACCESS table or query. I would like to print the word document on the filtered record...
0
by: Lauren Wilson | last post by:
Hi folks, I am using the following code to merge data from an Access table to a pre-defined Word 2000 merge document. It al works fine except for ONE problem -- after the merged document...
2
by: nissiml | last post by:
hi, i'm trying to open a asp.net web page that list files from a Windows application like winword and select a file from it . what do i have to do to make it happen, is it simple ? Thanks in...
2
by: CopynPaste | last post by:
Hi, I wrote a VB.net program that import a text file, which I will parse and place into arrays. My question is how to open an existing Word file without the Dialog Box that has a 4x10 table and...
2
by: gtslabs | last post by:
I have searched the archives for answers with no luck. I am now using Access 2003 from Lotus Approach. I see that Access does not have any built in envelope or mailing lable features. I want to...
5
by: johnvon | last post by:
I have a mail merge that runs flawlessly in Access 2000. In 2003 I keep getting dialog boxes that I can't figure out how to supress. Several of them are telling me that Admin (me!) has the database...
7
by: Defected | last post by:
Thanks all for help, I have tried this code but it's don't work. -------------------------------------------------------------------- Structure typedef struct{ int atomic_number; char...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.