troubleshooting Question

MS Access VBA refresh printers in Application object

Avatar of jackbenson
jackbensonFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft Access
10 Comments1 Solution739 ViewsLast Modified:
Hi,

I have an MS Access application that I want to provision over remoteapp.

this works fine - but the problem I am having is with the printers.

I preset certain reports to use certain printers - and use the following code to get the printers that are available to the application:

If Printers.Count > 0 Then
        ' Get count of installed printers.
        strMsg = "Printers installed: " & Printers.Count & vbCrLf & vbCrLf
   
        ' Enumerate printer system properties.
        For Each prtLoop In Application.Printers
            With prtLoop
       
                PrinterID = AddPrinter(.DeviceName, .DriverName, .Port)
                strMsg = strMsg _
                    & "Printer ID: " & PrinterID & vbCrLf _
                    & "Device name: " & .DeviceName & vbCrLf _
                    & "Driver name: " & .DriverName & vbCrLf _
                    & "Port: " & .Port & vbCrLf & vbCrLf
            End With
        Next prtLoop
   
    Else
        strMsg = "No printers are installed."
    End If

this works fine

the problem that I have is that when the remoteapp session starts - not all the remote printers are immediately available to the remoteapp and so never appear in the list of printers accessible to the application.

if there a way to refresh this list of printers?

if I go to File.. Print - the remote printers eventually appear.

thanks

jack
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros