If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
ActivePrinter Problem
I need to determine and/or set the active printer
prior to printing a report in Access 2002. The help files indicate that both of the following simple examples should work. Msgbox Application.ActivePrinter Msgbox ActivePrinter The first example returns a compile error "Method or data member not found". The second example will compile but returns a runtime error 429, "ActiveX component can't create object". Any suggestions would be appreciated. Jack Cannon |
#2
|
|||
|
|||
ActivePrinter Problem
Try:
Application.Printer.DeviceName You can set that to one of the items in the Application.Printers() collection. For an example of code that does that, see: Printer Selection Utility at: http://allenbrowne.com/AppPrintMgt.html -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jack Cannon" wrote in message ... I need to determine and/or set the active printer prior to printing a report in Access 2002. The help files indicate that both of the following simple examples should work. Msgbox Application.ActivePrinter Msgbox ActivePrinter The first example returns a compile error "Method or data member not found". The second example will compile but returns a runtime error 429, "ActiveX component can't create object". Any suggestions would be appreciated. Jack Cannon |
#3
|
|||
|
|||
ActivePrinter Problem
Thanks Allen,
This works great and your utility will prove to be a better solution for my client than what I was proposing. Any idea why the usually accurate Help Files do not appear to be working for my original example? Jack Cannon "Allen Browne" wrote: Try: Application.Printer.DeviceName You can set that to one of the items in the Application.Printers() collection. For an example of code that does that, see: Printer Selection Utility at: http://allenbrowne.com/AppPrintMgt.html -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jack Cannon" wrote in message ... I need to determine and/or set the active printer prior to printing a report in Access 2002. The help files indicate that both of the following simple examples should work. Msgbox Application.ActivePrinter Msgbox ActivePrinter The first example returns a compile error "Method or data member not found". The second example will compile but returns a runtime error 429, "ActiveX component can't create object". Any suggestions would be appreciated. Jack Cannon |
#4
|
|||
|
|||
ActivePrinter Problem
I never heard of the ActivePrinter object.
Just checked the Access 2003 help file, and it hasn't heard of it either. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jack Cannon" wrote in message ... Thanks Allen, This works great and your utility will prove to be a better solution for my client than what I was proposing. Any idea why the usually accurate Help Files do not appear to be working for my original example? Jack Cannon "Allen Browne" wrote: Try: Application.Printer.DeviceName You can set that to one of the items in the Application.Printers() collection. For an example of code that does that, see: Printer Selection Utility at: http://allenbrowne.com/AppPrintMgt.html "Jack Cannon" wrote in message ... I need to determine and/or set the active printer prior to printing a report in Access 2002. The help files indicate that both of the following simple examples should work. Msgbox Application.ActivePrinter Msgbox ActivePrinter The first example returns a compile error "Method or data member not found". The second example will compile but returns a runtime error 429, "ActiveX component can't create object". |
#5
|
|||
|
|||
ActivePrinter Problem
I'm using Access 2002 on one machine and Access 2000 on another. The
ActivePrinter object is described in both but doesn't seem to work in either. You have been a great help and I truly appreciate it. Jack Cannon "Allen Browne" wrote: I never heard of the ActivePrinter object. Just checked the Access 2003 help file, and it hasn't heard of it either. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jack Cannon" wrote in message ... Thanks Allen, This works great and your utility will prove to be a better solution for my client than what I was proposing. Any idea why the usually accurate Help Files do not appear to be working for my original example? Jack Cannon "Allen Browne" wrote: Try: Application.Printer.DeviceName You can set that to one of the items in the Application.Printers() collection. For an example of code that does that, see: Printer Selection Utility at: http://allenbrowne.com/AppPrintMgt.html "Jack Cannon" wrote in message ... I need to determine and/or set the active printer prior to printing a report in Access 2002. The help files indicate that both of the following simple examples should work. Msgbox Application.ActivePrinter Msgbox ActivePrinter The first example returns a compile error "Method or data member not found". The second example will compile but returns a runtime error 429, "ActiveX component can't create object". |
#6
|
|||
|
|||
ActivePrinter Problem
Found it through MSDN:
http://support.microsoft.com/kb/162239/en-us looks like it wasn't added to the Access libraries. "Jack Cannon" wrote: I'm using Access 2002 on one machine and Access 2000 on another. The ActivePrinter object is described in both but doesn't seem to work in either. You have been a great help and I truly appreciate it. Jack Cannon "Allen Browne" wrote: I never heard of the ActivePrinter object. Just checked the Access 2003 help file, and it hasn't heard of it either. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jack Cannon" wrote in message ... Thanks Allen, This works great and your utility will prove to be a better solution for my client than what I was proposing. Any idea why the usually accurate Help Files do not appear to be working for my original example? Jack Cannon "Allen Browne" wrote: Try: Application.Printer.DeviceName You can set that to one of the items in the Application.Printers() collection. For an example of code that does that, see: Printer Selection Utility at: http://allenbrowne.com/AppPrintMgt.html "Jack Cannon" wrote in message ... I need to determine and/or set the active printer prior to printing a report in Access 2002. The help files indicate that both of the following simple examples should work. Msgbox Application.ActivePrinter Msgbox ActivePrinter The first example returns a compile error "Method or data member not found". The second example will compile but returns a runtime error 429, "ActiveX component can't create object". |
Thread Tools | |
Display Modes | |
|
|