473,396 Members | 2,026 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,396 software developers and data experts.

Mail Merge Print Setup

Hello all.

I am starting to get to grips with VB.NET and we are building an
application that autmoates a mail merge. After much trial and error and
wanting to hide in a corner we have the following:

aDoc = wordApp.Documents.Open(fileName, missing, True, missing,
missing, missing, missing, missing, missing, missing, missing,
isVisible)
Debug.WriteLine("opened.....")

aDoc.MailMerge.OpenDataSource( _
Name:=fileSource, _
Connection:=strConn2, _
SQLStatement:=strSQL2)

Debug.WriteLine("open source....")
aDoc.MailMerge.Destination = WdMailMergeDestination.wdSendToPrinter

aDoc.MailMerge.Execute()

Debug.WriteLine("executed....")
aDoc.Close(False)
Debug.WriteLine("Printed")
This works great and is within a larger procedure that writes back to
the database saying that the file has been printed. I am now getting
rather cocky and want to explicitly state which tray the print is
coming out from. I have come across the following:

aDoc.PageSetup.FirstPageTray = WdPaperTray.wdPrinterUpperBin
aDoc.PageSetup.OtherPagesTray = WdPaperTray.wdPrinterLowerBin

but regardless of where I state these it does not make any difference
to the outcome of the print. Can I do this when executing a mailmerge
in the way that I have.

As always, any help would be greatly appreciated.

Martin.

Oct 25 '06 #1
0 1212

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tom Dauria | last post by:
I have an application that will be distributed remotely. In the Access application I am opening Word documents and mail merging. The Word documents are linked to a tmpLetter table. In my code I...
8
by: Squirrel | last post by:
Hi everyone, I've created a mail merge Word doc. (using Office XP) , the data source is an Access query. Functionality I'm attempting to set up is: User sets a boolean field to true for...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
15
by: sparks | last post by:
They are wanting to use word to print out some cards 4 to a page preformatted stuff from an access database. the problem with this is they don't want to do the same card twice. How can setup a...
4
by: lesperancer | last post by:
I have 3 tables (office97) tblQuote quoteNbr tblDetails ( quote : 1 <-> M: quoteDetails) quoteNbr detailLine product value
4
by: John J. Hughes II | last post by:
Could someone explain how to merge the form menu with the mdi container window. The menu strip items on the form window merge but I either end up with a blank blue menu on the form or top list of...
7
by: giladp1 | last post by:
I found Albert Kallal's great "Super easy Word Merge" code in his site at: http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html Thanks Albert so much for sharing this. I am looking...
1
by: Esther Lane | last post by:
Hello! First off, many many thanks to Albert who wrote the Mail Merge code for MS Access I am using. It has been working beautifully for a few years. However, my client just (without notice!)...
1
by: kirkus84 | last post by:
I am currently trying to do a multiple record mail merge through a query via a command button on a form. The query basically displays customers who have said yes to privacy. The user inputs a date...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.