Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add network printer

Status
Not open for further replies.

gumbald

Technical User
Apr 6, 2006
16
I am trying to create a web based interface in order that users can choose a printer and it can be installed. This is to be implemented in a school with many, many printers. However, I have the function:

<script language="VBScript" type="text/vbscript">
<!--'
Sub MapPrinter
Dim netPrinter, UNCpath
UNCpath = "\\casper\HPLaserJet4"
Set netPrinter = CreateObject("WScript.Network")
netPrinter.AddWindowsPrinterConnection UNCpath
'-->
</script>

This produces the following when the page is accessed:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'MapPrinter'
/Printers/index.asp, line 25

Any thoughts?

Jamie
 
This is not ASP. Active Server Pages run on the server... mapping a printer is definately a client-side activity.

The VBScript forum will probably yield better answers for you then the ASP forum.
You can reach it here: forum329



Oh, and the syntax for a subroutine:[tt]
Sub Foo()
'do something
End Sub[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top