none
Use Visio to install Printer

    Question

  • Greeting,

     

    I want to use visio to draw the location of the printers in my office ( the background is the picture of the office map, then I add printer icon on it).

    Publish the visio file to html (web page), then use click the printer icon on the web page, the printer will install for the user. (maybe use or plug vba).

    I did that about 7 years ago, now just can not remember how to do that, or the visio do not provide that any more.

     

    Thanks

    usera

     

    mardi 28 septembre 2010 23:10

Réponses

  • I was thinking that this could be done with a simple hyperlink, which you could add to the printer shape. The hyperlinks would be preserved when you did the Visio Save as Web export.

    It looks like it's a bit more complicated. This article describes how you can add a bit of script to your web page, then create a hyperlink that passes the printer address to the script function.

    http://blogs.msdn.com/b/mab/archive/2009/02/13/install-a-remote-printer-via-a-hyperlink-in-html.aspx

    So I think you could:

    1. Add printers with the appropriate hyperlink

    2. Do the Save as Web

    3. Slightly modify the resulting html by adding the script function, as described in the article.

    I haven't tried it, so let us know if it works!

     


    Chris Roth Visio Guy (http://www.visguy.com)
    lundi 4 octobre 2010 10:42

Toutes les réponses

  • Hi,

    Try following script:

    Public Sub MapPrinterEvent()
    Dim response As VbMsgBoxResult
    response = MsgBox("Set as Default Printer?", vbYesNo, "Set Default
    Printer")

    Call MapPrinter("\\PrintServer\Printer", response)
    End Sub

    Private Sub MapPrinter(ByVal PrinterPath As String, ByVal SetAsDefault As
    VbMsgBoxResult)

    Set WshNetwork = CreateObject("WScript.Network")
    PrinterPath = PrinterPath
    'PrinterDriver = "PrinterDriver"
    WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver

    If SetAsDefault = vbYes Then
    WshNetwork.SetDefaultPrinter PrinterPath
    End If
    End Sub

    Hope it helps.

    mercredi 29 septembre 2010 07:00
    Modérateur
  • Thanks Jennifer,

     

    Thanks for your script, I had Similar one.

    The question how to link this script to the printer icon in Visio,  to make it works

    Thanks

     

    mercredi 29 septembre 2010 13:27
  • maybe this might give you some ideas

    http://msdn.microsoft.com/en-us/library/aa140251(office.10).aspx

    al

     

    mercredi 29 septembre 2010 14:34
  • Thanks Al,

     

    But we can not use this solution,

     

    Just pure Visio. I am very sure it works. just do not remember now.

     

    usera

     

    mercredi 29 septembre 2010 16:28
  • Thanks Al,

     

    But we can not use this solution,

     

    Just pure Visio. I am very sure it works. just do not remember now.

     

    usera

     


    Greeting,

     

    Anybody can help me?

     

    Thanks

    usera

    dimanche 3 octobre 2010 21:29
  • I was thinking that this could be done with a simple hyperlink, which you could add to the printer shape. The hyperlinks would be preserved when you did the Visio Save as Web export.

    It looks like it's a bit more complicated. This article describes how you can add a bit of script to your web page, then create a hyperlink that passes the printer address to the script function.

    http://blogs.msdn.com/b/mab/archive/2009/02/13/install-a-remote-printer-via-a-hyperlink-in-html.aspx

    So I think you could:

    1. Add printers with the appropriate hyperlink

    2. Do the Save as Web

    3. Slightly modify the resulting html by adding the script function, as described in the article.

    I haven't tried it, so let us know if it works!

     


    Chris Roth Visio Guy (http://www.visguy.com)
    lundi 4 octobre 2010 10:42
  • Hi! Wow, you never thought you'd be seeing this 8 years later, did you? Quick question, what do I run this script in? Thanks!

    mercredi 13 juin 2018 20:36