Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-10-17
9
Medium Priority
?
1,620 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 85
ID: 22744015
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
ID: 22747090
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
ID: 22750921
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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:noclew
ID: 22787301
I'm gathering nobody has any other thoughts on this?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 22794191
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
ID: 22807714
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 2000 total points
ID: 22810322
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
ID: 31507197
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
ID: 22819548
;-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

718 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