Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word 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 January 26th, 2007, 12:27 PM
Registered User
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Prevent MODI from opening after PrintOut

I am trying to perform a mail merge from word that will result in an individual tiff file for each merge record. I am using Cindy Meister's code to merge to a file and then programmatically save each page as a separate file. Instead of using SaveAs, I have substitued PrintOut and set the active printer to MODI. Everything is working splendidly except that the MODI printer driver insists on opening a file in the MODI viewer after it is "printed". This creates obvious problems when merging a few hundred records at a time in this manner. I have done extensive research on the MODI object to no avail. I have also tried using AppActivate with SendKeys. No matter what I try, I cannot get the MODI viewer to either A) Close after opening printed file, or B) Not open in the first place. Is anyone aware of a solution to my problem or a better approach to achieve my objective?

Thank you in advance for your time and assistance.

 
Old March 3rd, 2007, 06:28 AM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found a solution for this in the article below. All you have to do is create the DWORD registry OpenInMODI and set it to 0.

http://forums.microsoft.com/msdn/sho...22303&siteid=1






Similar Threads
Thread Thread Starter Forum Replies Last Post
MODI Automation ArtDecade VB How-To 3 March 5th, 2009 02:04 AM
Listbox printout scriptingit Access VBA 0 August 28th, 2006 08:59 AM
Printout Error? cmperez VB How-To 0 July 13th, 2006 10:29 PM
MODI.Document.SaveAs Method hannah_h VB.NET 2002/2003 Basics 5 January 13th, 2005 09:09 AM
How to Get printout.............. arshad mahmood VB Databases Basics 1 August 11th, 2003 08:50 AM





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