Jump to content
Sign in to follow this  
clustersblue

Printer Devmode

Recommended Posts

clustersblue

Hi,

This might have been posted and answered before but I don't know the "key" word thus this might be a duplicate. My apology.

Goal: To be able to modify the appropriate member of the printer devmode base on user's preference.

Objective:

  • Use the Printing Preferences dialog in modifying the appropriate member of the printer devmode.
  • Use a PRINTUI.DLL function to save the devmode values in a binary file.
Saving the devmode value was easy but what gated me is how to modify the appropriate member using the Printing Preferences dialog by invoking it using this code:

Run('RUNDLL32 PRINTUI.DLL,PrintUIEntry /e /n "' & printername & '"')

The problem with using this code is that it doesn't have a return value whether the user is clicking the OK or CANCEL button. The only solution I think is to query that button state (either OK or CANCEL). Unfortunately, I don't know how to do that. I cannot seems to find the solution from the help file thus I'm looking here for help. Is it possible to query the state (clicked or not) of OK or CANCEL buttons in Printing Preferences dialog? Or is there other way invoking the Printing Preference dialog without using the said code? Any solutions/suggestions are very much appreciated.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×