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!