A recent newsgroup post asked about accessing a network printers management page from a Visio page, so I thought I would share some things that I discovered a while back. Visio 2003 and Visio 2007 Professional edition include an add-on called FMPrint, which you can use with any shape in Visio. I used it with some network printer shapes in a couple of add-ins myself. I’m not aware of any public documentation about this handy little add-on, so here is what I have discovered.
You can see the add-on in action by opening the Shapes Maps and Floor Plans Building Plan Resources stencil and dropping the Printer shape onto your page. Alternativaly you can start a new Maps and Floor Plans Space Plan drawing. Notice the SmartTag in the bottom left corner which gives you access to the FMPrint add-on:
If you open the ShapeSheet
, then you will see that there are three Shape Data rows; four Actions; and 1 SmartTag associated with the add-on.Shape Data Rows
Name | Label | Value |
visPrinterModel | Printer Model | Enter manually or returned by “Find printer …” |
visPrinterLocation | Printer Location | Enter manually or returned by “Find printer …” or “Browse …” |
visPrinterPath | Printer Path | Enter manually or returned by “Find printer …” or “Browse …” |
Actions
Name | Action | Label | Tag Name | Button Face | Disabled |
visPrinter1 | =RUNADDONWARGS(“FMPrint”,”/cmd=3″) | “Set as &Default Printer” | “PRN” | “1100” | =IF(LEN(Prop.visPrinterPath)>0,FALSE,TRUE) |
visPrinter2 | =RUNADDONWARGS(“FMPrint”,”/cmd=4″) | “&Open print queue” | “PRN” | “986” | =IF(LEN(Prop.visPrinterPath)>0,FALSE,TRUE) |
visPrinter3 | =RUNADDONWARGS(“FMPrint”,”/cmd=2″) | “&Find a printer in the directory…” | “PRN” | “6371” | |
visPrinter4 | .=RUNADDONWARGS(“FMPrint”,”/cmd=1″) | “&Browse for a printer…” | “PRN” | “1745” |
SmartTag
The visPrintern Actions appear under the SmartTag because they have the same TagName value.
Name | Tag Name | Description |
visPrinter | “PRN” | =IF(Actions.visPrinter1.Disabled,”Configure Printer”,Prop.visPrinterModel) |
Find a printer in the directory
This enables you to search your Active Directory to locate a specific printer…
When you select one, then the Printer Model, Location and Path values are automatically filled in.
Open print queue
Once you have a value for the Printer Path Shape Data (which can be manually entered or automatically filled in from Find or Browse functions), then you are able to open the printer queue…
This will give you access to the printer’s properties…
Set as Default Printer
This function does give you the ability to set the selected printer as the default, but you may get a security warning….
Browse for printer
I have never managed to get this to return the Printer Model, and sometimes it just seems to hang, so I recommend either using Find or manually enter the values.
Well, that’s all I know about the FMPrint add-on … does anyone know more?
Chris says
So they ripped out network scanning and create flowchart from CVS, but left this in?!
How on Earth, Sir David, did you stumble upon this one?