• Categories

  • Archives

  • Subscribe

  • Meta

Microsoft Exchange Server 2007 Stencil

Posted by Visio Guy on December 28th, 2006 6040 views

Read Full ArticleMicrosoft has published a brand-spanking-new set of Visio shapes for Microsoft Exchange Server 2007. You can download the stencil for free from Microsoft's web-site and immediately get to work planning your next Exchange deployment. You'll also amaze your co-workers with your unmatched graphic-abilities and non-boring PowerPoint slides!

Shapes Up Close

If you want to have a sneak-preview of what the shapes look like, I've created a screen-shot of all the master-shapes and their names, for your convenience. Just clikc the thumbnail at right to see an up-close view of all the neat, new graphics!

Exchange Server 2007 Visio Stencil Shape Set

If you like what you see, you can download the shapes from Microsoft...here!

Sneak in Some Code...

By the way, I didn't align all those shapes on the page and type in the text by hand. Whaddaya think I'm crazy!?!? I wrote a small snippet of VBA code to drop the shapes on the page, and set the text automatically.

Here's the snippet:

Sub LayoutShapes()

Dim pg As Visio.Page
Dim mst As Visio.Master
Dim shp As Visio.Shape
Dim iRow As Integer, iCol As Integer, iCols As Integer
Dim dSpcX As Double, dSpcY As Double

'// Get a page object:
Set pg = Visio.ActivePage

'// Specify the number of columns:
iCols = 5
iRow = 0
iCol = 0

'// Spacing between columns and rows:
dSpcX = 1.75
dSpcY = 1.5

'// Loop through each master in the document:
For Each mst In pg.Document.Masters

'// Drop the master and retain the shape variable:
Set shp = pg.Drop(mst, iCol * dSpcX, -iRow * dSpcY)

'// Increment or reset the column index:
iCol = iCol + 1
If (iCol > iCols) Then
iCol = 0
iRow = iRow + 1
End If

'// Set the text:
shp.Text = mst.Name

Next

'// Center the shapes on the page:
pg.CenterDrawing

End Sub

And here's the complete procedure for setting up the code and documenting the stencil:

  1. Open a stencil that you want to automatically document
  2. Create a New blank Visio drawing
  3. Show it's document stencil via File > Shapes > Show Document Stencil
  4. Drag all the shapes from a stencil file into the document stencil
  5. Close the original stencil
  6. Press Alt + F11 to open the VBA editor
  7. Paste the code snippet from above into the VBA project
  8. Hit F5 to run the code
  9. Alt + Tab back and forth between Visio and VBA to check how the code ran. Tweak the values for dSpcX, dSpcY, and iCols until you like the results.

Visio used to ship with a stencil catalogue add-on, but I don't know where it's gone. Hopefully you'll find this snippet useful in helping you to regain some of that lost functionality!

(Download Microsoft Exchange Server 2007 Visio Shapes Stencil)

Share this article!

These icons link to social bookmarking sites where readers can share and discover new web pages.

  • StumbleUpon
  • Digg
  • del.icio.us
  • Technorati
  • YahooMyWeb
  • Slashdot

Related Posts:

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Tag Cloud

  • Recent Comments on Visio Guy

  • RSS The Latest from the Visio Guy Forum

  •