Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2008

Tip: Looking for answers? Try searching our database.

Add a New Printer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ivan Grozney - 13 Jun 2008 23:58 GMT
I have used things from these posts to bring up the default Printer Dialog
box so that a user can choose a printer for the report.  I also have built my
own.

However, occasionally (more than I care to admit) I have users without a
printer installed but the PDF or the MS XPS DOCUMENT WRITER and the MS OFFICE
DOCUMENT IMAGE WRITER.  

On the standard dialog box there is no FIND PRINTER like other Office
products.  So I built my own figuring I could add the Add Printer like what
is in "Add a printer" under printers and faxes.  So I get to the ADD
PRINTER.PDS file that brings up the part where you add a printer.  

However, when I try to call it from within Access as a shell, I get

Invalid procedure call or argument.

Does anyone know how to call Add A Printer from within Access VBA?

tia

Vanya
Stuart McCall - 14 Jun 2008 01:47 GMT
>I have used things from these posts to bring up the default Printer Dialog
> box so that a user can choose a printer for the report.  I also have built
[quoted text clipped - 21 lines]
>
> Vanya

Shell "rundll32.exe printui.dll, PrintUIEntry /il"

will bring up the Add Printer Wizard.
Ivan Grozney - 14 Jun 2008 05:26 GMT
Stuart,

   Thank you, works great!  Two more questions...

1.  When I bring this up, it opens up behind the access window, any ideas on
how to bring it up in front?

2.  Do you know how to bring up the FIND PRINTER dialog box?

Thanks,

Vanya

> >I have used things from these posts to bring up the default Printer Dialog
> > box so that a user can choose a printer for the report.  I also have built
[quoted text clipped - 25 lines]
>
> will bring up the Add Printer Wizard.
Stuart McCall - 15 Jun 2008 01:49 GMT
> Stuart,
>
[quoted text clipped - 9 lines]
>
> Vanya
<SNIP>

I'm afraid it's no to both questions. Perhaps someone else can jump in?
Ivan Grozney - 27 Jun 2008 21:15 GMT
If you change the command to

Shell "rundll32.exe printui.dll, PrintUIEntry /il", vbNormalFocus
it will set focus to the add printer wizard.

> > Stuart,
> >
[quoted text clipped - 12 lines]
>
> I'm afraid it's no to both questions. Perhaps someone else can jump in?
Stuart McCall - 28 Jun 2008 01:45 GMT
> If you change the command to
>
> Shell "rundll32.exe printui.dll, PrintUIEntry /il", vbNormalFocus
> it will set focus to the add printer wizard.

Already tested that. Doesn't do it for me...

Win XP Pro SP2 here. How about you?
Ivan Grozney - 30 Jun 2008 15:36 GMT
Stuart,

    I have XP Pro with SP3.  Running Access 2003.

> > If you change the command to
> >
[quoted text clipped - 4 lines]
>
> Win XP Pro SP2 here. How about you?
Stuart McCall - 30 Jun 2008 22:09 GMT
> Stuart,
>
>     I have XP Pro with SP3.  Running Access 2003.

Well in that case the only difference between us is SP3. Perhaps someone
else with SP2 could try it and confirm/deny my result in this thread...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.