Publisher Default Printer

User has hundreds of MS Publisher documents, after a recent printer change ALL MS Publisher docs point to Fax printer. Is there any way to get All MS Publisher Docs to print to default printer? I know this can be done on each individual document but there are hundreds of them.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omgangIT ManagerCommented:
I can't find any reference on how to discover the specified printer for the open Publisher document; the Publisher.Document object does not seem to expose this.  I also cannot find any setting/option within Publisher where the specific printer is saved.  Yet, as you know, each document can save specific print settings.

You could probably do this via VBA or vbscript.
1) Iterate through all files in a folder(s) looking for filenames ending in .pub
2) Open the file using Publisher automation
3) Change the Printer object to the desired printer
4) Save the doc
Basically, you're simply automating the process of opening each Publisher document, specifying a different printer, and then saving the file with the changes.

How are you with VBA and/or vbscript?
OM Gang

Here's a link describing MS Publisher Printer Object via VBA --
omgangIT ManagerCommented:
Proof of concept.
I successfully changed the specified printer for a Publisher document using the following.  The first sub is from the MSDN link I posted above; it get's a list of installed printers.  I simply copied the output from the Immediate window (for the printer I wanted to specify) and used that string in the second procedure.

OM Gang

Option Explicit

Public Sub Printer_Example()
 Dim pubInstalledPrinters As Publisher.InstalledPrinters
 Dim pubApplication As Publisher.Application
 Dim pubPrinter As Publisher.Printer
 Set pubApplication = ThisDocument.Application
 Set pubInstalledPrinters = pubApplication.InstalledPrinters
 For Each pubPrinter In pubInstalledPrinters
 Debug.Print pubPrinter.PrinterName
 If pubPrinter.IsActivePrinter Then
 Debug.Print "This is the active printer"
 Debug.Print "Paper size is ", pubPrinter.PaperSize
 Debug.Print "Paper orientation is ", pubPrinter.PaperOrientation
 Debug.Print "Paper source is ", pubPrinter.PaperSource
 End If
End Sub

Public Sub SetPrinter()

On Error GoTo Err_SetPrinter

    Dim pubApplication As Publisher.Application
    Dim pubPrinters As Publisher.InstalledPrinters
    Dim pubPrinter As Publisher.Printer
    Dim strNewPrinter As String
    strNewPrinter = "\\Servername\Printer Share Name"   '<--- this I copied from the output of the sub procedure above
    Set pubApplication = ThisDocument.Application
    Set pubPrinters = pubApplication.InstalledPrinters
    pubPrinters(strNewPrinter).IsActivePrinter = True

        'destroy object variables
    Set pubPrinters = Nothing
    Set pubApplication = Nothing
   Exit Sub

   MsgBox Err.Number & " (" & Err.Description & ") in procedure SetPrinter of VBA Document ThisDocument"
   Resume Exit_SetPrinter
End Sub

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.