• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1627
  • Last Modified:

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

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
noclew
Asked:
noclew
  • 4
  • 4
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
Jeffrey CoachmanCommented:
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
 
noclewAuthor Commented:
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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
noclewAuthor Commented:
I'm gathering nobody has any other thoughts on this?
0
 
Jeffrey CoachmanCommented:
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
 
noclewAuthor Commented:
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
 
Jeffrey CoachmanCommented:
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
 
noclewAuthor Commented:
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
 
Jeffrey CoachmanCommented:
;-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now