Printing to 2 different printers - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Printing to 2 different printers

Last post 04-01-2009 06:04 AM by pineapple23. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-01-2009 06:04 AM

    Printing to 2 different printers

     

    Hi

     I'm pretty new to infopath, and have very little experience with coding of any kind. What i need to do is to be able to print a view (my print View) on 2 separate network printers at the same time at the press of a button. I did some googling and found some code. (which i dont exactly understand, but nevermind)

    Dim sDefault As String
     
    Dim sOtherPrint As String
     
    sDefault = "\\UPSCOMP\UPS Thermal 2543"
     
    sOtherPrint = "\\3MACHINECONTROL\UPS"
     
    '''print the document with default printer
     
    ActiveDocument.PrintOut
     
    '''change the active printer
     
    Application.ActivePrinter = sOtherPrint
     
    '''print the document with the other printer
     
    ActiveDocument.PrintOut
     
    '''reset the defualt printer
     
    Application.ActivePrinter = sDefault
     

    I tried pasting this into the script editor, using what i asssume to be the addresses for my printers (NB not the ones given in the above example). Firstly, could someone please tell me how to actualluy find the required addresses for my printers. Secondly, my problem is that when i attempt to preview this form it gives a message:

     

    InfoPath cannot open the selected form because of an error in the form's code.
    The following error occurred:

    Expected ';'
    File:script.js
    Line:24
    Dim sDefault As String

     

    please help! many thanks!

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.