Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    London
    Posts
    341

    Unanswered: VB code to change printer peferences

    Hi guys,

    I currently have an Excel sheet which lists documents to print at a specific time. It lists the file location and file name and a description of the settings to use when you print it. At times I may have to print 30 documents from a list.

    I would like to speed up the process of getting this printed and an idea I had was to use some code to select a document from a list, set the correct print settings, print and then move to the next document. Easily done.

    The problem I have is that there are some settings I am unable to change and would like to know if there is a way that I can adjust these settings.

    When you press CTRL + P, you get the normal print dialog box. There is an option to look at the printer peferences on this box and it is the settings within the printer peferences that I would like to change.

    If my description of the above doesn't make sense you can navigate to the page that I mean by going to control panel, selecting printers, selecting the properties of your printer and then clicking on printer preferences. It is the settings in this area that I would like to change using some form of VB code.

    I'm not very vb literate but have a basic understanding and if someone can point me into the right direction of where to look or if someone can provide me with some code that would be able to change one thing I can work from there.

    Many thanks,

    Christy

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Are you using VB to automate Excel, or are you using VBA from within Excel?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Oct 2005
    Posts
    178
    Quote Originally Posted by christyxo
    Hi guys,

    I currently have an Excel sheet which lists documents to print at a specific time. It lists the file location and file name and a description of the settings to use when you print it. At times I may have to print 30 documents from a list.

    I would like to speed up the process of getting this printed and an idea I had was to use some code to select a document from a list, set the correct print settings, print and then move to the next document. Easily done.

    The problem I have is that there are some settings I am unable to change and would like to know if there is a way that I can adjust these settings.

    When you press CTRL + P, you get the normal print dialog box. There is an option to look at the printer peferences on this box and it is the settings within the printer peferences that I would like to change.

    If my description of the above doesn't make sense you can navigate to the page that I mean by going to control panel, selecting printers, selecting the properties of your printer and then clicking on printer preferences. It is the settings in this area that I would like to change using some form of VB code.

    I'm not very vb literate but have a basic understanding and if someone can point me into the right direction of where to look or if someone can provide me with some code that would be able to change one thing I can work from there.

    Many thanks,

    Christy
    Add the Windows Common Dialog Control to your form. The Windows COmmon Dialog COntrol can be obtained from the Project/Compnent- Controls tab

  4. #4
    Join Date
    Oct 2003
    Location
    London
    Posts
    341
    I intended to do this using VBA via excel at first, then I thought it would be easier in VBA and Access. The above suggestion, I guess would be via a VB programming program?

    If this is the easiest way to do it then I'll have to try that but if anyone knows of a way using VBA It would really be appreciated - Basically I dont have a VB program at work and if I had to do it this way I'd need to build this at home

  5. #5
    Join Date
    Oct 2005
    Posts
    178
    Quote Originally Posted by christyxo
    I intended to do this using VBA via excel at first, then I thought it would be easier in VBA and Access. The above suggestion, I guess would be via a VB programming program?

    If this is the easiest way to do it then I'll have to try that but if anyone knows of a way using VBA It would really be appreciated - Basically I dont have a VB program at work and if I had to do it this way I'd need to build this at home
    Search the VBA help section and find how to use the PrinterDialog function, it's a common tool for Microsoft apps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •