Solved

How do I change advanced "Printing Preference" for Microsoft Office Document Image Writer programmatically?

Posted on 2008-10-17
9
1,593 Views
Last Modified: 2013-11-28
Hi there.  I'm looking for a solution to change the advanced printing preferences for the Microsoft Office Document Image Writer programmatically.  The default file output format is "MDI".  I need to change it to "TIFF" without user intervention.  Once changed, the default can stay as tiff.  There is no need to change it back.

I'm currently using the printout command in VBA to create a file in tif format.  Unfortunately, although it's extension is a tif, it is still an MDI format.  I can get around this by first changing the advanced printing preferences manually first.  Then it properly prints it out as a tif.

I've tried using the MODI object with VBA but no luck.  Any ideas either using a batch file or VBA that I could then asks users to run?  Problem is I cannot change the registry keys directly as I do not have administrator access.

Thanks
0
Comment
Question by:noclew
  • 4
  • 4
9 Comments
 
LVL 84
Comment Utility
Are you sure it's a good idea to permanently change a setting on a user machine just to allow your app to run? Wouldn't you be better off reworking your application to fit the parameters of your user, rather than asking your user change their environment to suit your app?

I don't know enough about MODI to really comment, but have you seen these links:
http://www.microsoft.com/downloads/details.aspx?familyid=7B6D9193-A1C8-4934-8007-47089FDE37DE&displaylang=en
http://www.microsoft.com/downloads/details.aspx?familyid=8f93e445-b1cf-4477-a373-e17417d616bc&DisplayLang=en
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
noclew,

It would also help if you explained exactly what it is you are trying to accomplish with this system.
(Print the form?, Print a Report?, or something else entirely?)

JeffCoachman
0
 

Author Comment

by:noclew
Comment Utility
Hi there.

I'm accomplishing the same task in two separate ways.  Within Word, I've created a macro that uses a simple printout command to print to a file.  The printer I'm using is the MODI printer.  From there, the document enters a queue to be entered into an IBM Imageplus system as an imaged document.  However, the document must be sent as a lossless tiff, 200 DPI in order for the interface on the other end to complete the conversion correctly into the imaged system.  By switching the advanced printer preferences manually to output as a tiff instead of mdi, the solution solution works quite well with no additional programming required.  If there were only 10 or 15 users, I would give them directions and provide support on switching the advanced printer setting manually as its not a hard thing to do for most.  However, there will be between 700 and 1000 users.  Organizationally, I cannot provide support to manually do this and giving instructions to that many people, regardless of how well they are written is not a good solution.  Its my fallback solution.

These are word templates created for the users.  Secondly, I have also created two templates using excel and I am completing the same task.  For excel, I use the MODI object.  First, I printout to the MODI printer to a file.  Although it is set to TIFF output, excel will not output to a tif.  However, it will output to an MDI through the MODI printer.  Extension I use is ".tif". though I know it is actually an MDI.  From that point I then import that MDI into a blank document (MODI.Create statement).  MODI create statement will allow you to import an MDI as long as its extension is tif without producing an I/O error.  I then immediately write it back to the same file using the MODI.Saveas statement.  This statement allows me to change format a lossless tiff image and save to the queue for processing.

Last hurdle is to change that advanced setting so it is seamless to the user.

Any additional comments would be greatly appreciated.
0
 

Author Comment

by:noclew
Comment Utility
I'm gathering nobody has any other thoughts on this?
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
If there is no need to change it back to MDI, then why not just change it under the printer Properties.

I changed mine as a test, and it now prints TIFF files.

JeffCoachman
0
 

Author Comment

by:noclew
Comment Utility
Boag2000,

That's what I've done with my test group of users and it works great.  I'd like to change it globally for all my users rather than giving them instructions as they are not a very tech savvy bunch.  Either through a batch file they could run once or within the VBA itself.  I've tried printuientry but can't seem to get it to restore the settings.  I can get it to save the settings.

Any thoughts?
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
Comment Utility
noclew,

It looks like this is a registry setting, you can see these links:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322303&SiteID=1
http://www.techtalkz.com/microsoft-office/113092-can-not-view-mdi-tiff-files-office-2007-a.html

You can do a search here or on gooble on how to edit the registry from code.

JeffCoachman
0
 

Author Closing Comment

by:noclew
Comment Utility
I was hoping to do it without registry changes but I think you're correct.  I can't seem to find any other way.  Thanks for your help!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
Comment Utility
;-)
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

771 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now