Install printer from Visio Drawing

R

Roland

I am creating a map identifying where printers are located within the
building. I am trying to automatically install a printer driver from within
the Visio drawing itself. I have tried to create a macro, but the macro
doesn't seem to be recording my actions. I have also tried to create a
hyperlink with no success.

**Note** After creating the diagram, I save as a webpage and publish this
to our company. For the most part, this has not caused any problems as far
as linking objects or creating hyperlinks.
 
P

Paul Herber

I am creating a map identifying where printers are located within the
building. I am trying to automatically install a printer driver from within
the Visio drawing itself. I have tried to create a macro, but the macro
doesn't seem to be recording my actions. I have also tried to create a
hyperlink with no success.

**Note** After creating the diagram, I save as a webpage and publish this
to our company. For the most part, this has not caused any problems as far
as linking objects or creating hyperlinks.

If the driver is installed with an exe or msi file then if you insert
a hyperlink for the appropriate shape and set the link address to the
exe/msi then that should work. Different versions of
Visio/Office/Security settings will affect how this works.
 
R

Roland

These are network printers. What I would like to be able to do is just
install right from the network share without having to use any exe's or
msi's. You should be able to just use the url but when I tried that, it
wouldn't work.

Thanks for the info.

Roland
 
A

Al Edlund

Paul,
If the platform is vista and the browser is IE, hyperlinks may or may not
work. Some of the functionality has been crippled. It obviously gets even
worse if you are at x64.
Fyi,
al
 
R

Roland

Came up with the 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


Problem now is that when I change the double-click behavior to run this as a
macro, it works within Visio, but it doesn't work when I save it as a web
page.

Roland
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top