David's profilebVisualPhotosBlogListsMore ![]() | Help |
bVisualbe smart, be clear, be visual! |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
May 22 Using MailTo Protocol in Visio ShapesA newsgroup question asked whether you can send an email from a Visio shape, so I thought it was time to document an example of just that.. In this example, I have added four Shape Data rows for the Address, Subject, CC and BCC fields… However, I have used the Screen Tip cell for the message body because it is the only out-of-the-box dialog that allows you to enter multi-line text into a Shape Cell. To open the Screen Tip via the right mouse menu, I added the formula =DOCMD(1685) to an Actions row. To force the Hyperlink.Address cell of the new Hyperlink.Mail row to update whenever any of the values in the four Shape Data rows or the Screen Tip is changed, I added the following formula to a new User-defined cell called, MailToTrigger: =DEPENDSON(Prop.Address,Prop.Subject,Prop.CC,Prop.BCC,Comment)+SETF(GetRef(Hyperlink.Mail.Address),"=""MailTo:"&Prop.Address&"?Subject="&Prop.Subject&"&CC="&Prop.CC&"&BCC="&Prop.BCC&"&Body="&Comment&"""") That’s it! Just enter email addresses, a subject and body, then your mail client will be opened pre-filled from the right-mouse menu of the VIsio shape, or, of course, from a SaveAs web page. You can read about the MailTo protocol here: http://msdn.microsoft.com/en-us/library/aa767737.aspx May 16 Old Trafford in Deep ZoomSometimes in life you get opportunities that you just have to take …. and one just came to this old Manchester United supporter … a chance to watch my team play from a corporate box against Arsenal … and I could take my son, Krysh, too! We only needed a draw to win the Premier League (again) … and a draw is what we got! Like an earlier post, I took lots of photos and patched them together using Microsoft Image Composite Editor. I love that tool! Just in case you have never heard of Old Trafford .. it is in Manchester, England … just here:
I last went to Old Trafford over 20 years ago … it didn’t look like this then … this is the East Stand. Here is the Deep Zoom version : Old Trafford East Stand Here is the Deep Zoom version : Old Trafford Pre Kick Off Here is the Deep Zoom version : During the match The match was 0-0, but that was enough to be presented with the Barclay’s Premier League title for the 3rd consecutive year … that’s 18 in total! Thank you to everyone who made it such a great day! (PS : You missed a great day, Tim) May 12 An Interview on TechNet about VisioI was interviewed by Microsoft when I was at the MVP conference in March. I rambled on about some of my experiences with Visio over the years. It has now been published for all to see at http://edge.technet.com/Media/Visio-Drawing-on-Experience-with-David-Parker/ In case you are wondering, the shirt was from the 1998 Visio Conference, which was pre-Microsoft. It’s probably time that I had a new wardrobe! Seattle Trip May 2009I went to see the latest version of Visio last week at Microsoft Campus in Redmond, but, as usual, chose to stay in Seattle because it is such a great city. I love to walk down to Pike Place market in the morning to ponder over which specialist food to select, or to smell the flowers as they are arranged for the day’s pickings. So, with a piroshky (Russian pastry) and coffee I strolled to the little park at the end to contemplate the day. The view across Puget Sound is fantastic and I wanted to capture it to share with my friends. I only have a handy little digital camera, but fortunately, I recently became aware of a handy little application called Microsoft Image Composite Editor (http://research.microsoft.com/en-us/um/redmond/groups/ivm/ICE/ ) . MICE patches your photos together to make a larger panorama, and then you can export it into many different formats. I have saved four panoramas for viewing using Deep Zoom in Silverlight 2.
I have shared the collection on Live Maps (I think this only works if you are signed in): http://maps.live.com/default.aspx?v=2&FORM=LMLTCC&cp=47.577559~-122.091288&style=r&lvl=11&tilt=-90&dir=0&alt=-1000&phx=0&phy=0&phscl=1&cid=3350D61BC93733A9!1505&encType=1 I have also used the 3D Map Tour feature in Live Maps to create a short movie showing the location of the panorama positions: 3D tour of panorama placemarks
Victor Steinbrueck ParkI didn’t know the name of the little park at the end of Pike Place until I looked it up on Live Maps View the panorama here : http://www.bvisual.net/views/VictorSteinbrueckPark.html The Moore HotelAs far as I know, this is the only listed hotel in Seattle. View the panorama here : http://www.bvisual.net/views/TheMooreHotel.html Snoqualmie FallsAfter visiting two wineries on Saturday, I eventually made it to the waterfall that is 100ft higher than Niagara, and featured in David Lynch’s Twin Peaks. View the panorama here : http://www.bvisual.net/views/TheFalls.html Yellow Lake, SammamishI visited my friend Richard Smith and his lovely family out in Sammamish and went for a walk around their local lake. View the panorama here : http://www.bvisual.net/views/YellowLake.html April 30 celMaker 2 (part 2)My last post was only yesterday, when I released celMaker 2 for Visio 2007 and Excel 2007, but I have already had some feedback from my fellow Visio MVP, John Goldsmith. He found a couple of “bugs” and suggested an improvement, so they have all been implemented. InstallationThe installation from the web site should be straight forward … if you press the launch link, rather than the install button. The installation adds celMaker2 to your programs under bVisual. You can uninstall using Control Panel. Note that celMaker2 will automatically check for any updates whenever it is started. Format as Table optionJohn suggested that it would be nice to automatically format the data as a table in Excel. So, this option does just that, which means that the headers stay visible, even when scrolled. Bug Fixes1. One too many Invisible and Disabled columnsIf you used celMaker 2 in the last 24 hours, then you will find Invisible2 and Disabled3 columns … simply delete them 2. Reading Multiple Masters with precedent cellsThis resulted in an error because the processing got confused … now fixed 3. Unnamed Connection Point RowsThese were being ignored … now fixed Please feel free to email me, davidp at bvisual.net with any comments .. they are disabled in this blog because I was getting a lot of Chinese spam. April 29 Introducing celMaker 2I was recently asked to provide a new version of celMaker that works with Visio 2007 and Excel 2007, so I got my old VB6 code out of SourceSafe and upgraded it so that I could run it on my Vista 64 laptop too. I also decided that I would release this version to the public as freeware because I have added no new features.So, what is celMaker? And where can you download it? Last one first … you can download it from here : http://www.bvisual.net/products/celMaker/publish.htm Most Visio users will have the components, so you can just click the Launch link. 1. IntroductioncelMaker is a developer(ish) tool for Visio which allows the most often used sections of a Visio ShapeSheet to be copied into an Excel spreadsheet, or from an Excel spreadsheet onto a Visio master. 2. Direction2.1 From Excel to VisioThis will forward engineer a suitable Excel worksheet to selected Visio Masters. 2.1.1 Remove all existing cells firstIf checked, will remove all cells for the selected ShapeSheet sections on the master, before adding any. 2.1.2 Match Master nameIf checked, will only process changes from the spreadsheet to the master if the master names match. 2.1.3 Avoid Reserved wordsIf checked, will not process any custom properties with the following reserved names:
You can edit this list on the Settings tab. 2.2 From Visio to ExcelThis will reverse engineer selected Visio Masters into a formatted Excel worksheet. 2.2.1 Insert HeaderIf checked, will create the headers row in the Excel spreadsheet. 2.2.2 Insert at endIf checked, will preserve any existing rows in the selected Excel spreadsheet, by adding new ones at the end. 3. ExcelSelect an open Excel workbook (document) from the upper list box, and then the worksheets will be listed in the lower one. Select a single worksheet in the lower list box. 3.1 RefreshClick this button to refresh the list of open Excel documents and worksheets 4. VisioThe Open Visio Documents panel only lists editable documents. If you want to copy from a Master on a read-only stencil, then just drag and drop it onto an editable document. Select an open Visio document in the upper list box, then its Masters will be listed in the lower one. You must select one or more Visio Masters of an open Visio document. 4.1 RefreshClick this button to refresh the list of open Visio documents and Masters 5. SectionsThis tab allows the required sections to be selected for forward or reverse engineering. 6. SettingsThis tab enables you to edit the reserved words or check the column headers. 7. CloseCloses celMaker 8. HelpOpens a pdf of this file 9. AboutOpens the About dialog (and a shameless plug for my book!). 10. ApplyThe Apply button becomes enabled when you have selected both an Excel worksheet and a Visio Master. 10.1 From Visio to ExcelIf the Direction select is Visio to Excel, then you will be prompted to confirm the copy operation. Here is the Server Master whose cells are being copied in the following example: The selected section’s cells are copied to the selected Excel worksheet: 10.2 From Excel to VisioYou need to select an editable Master to copy the cells to from a worksheet. You will be prompted to continue. After processing, the Master will have all of the ShapeSheet sections that you have in your worksheet. 10.3 Excel Worksheet ColumnsIf you reverse engineer Visio cells to Excel then a row will be created in the worksheet for every cell in Visio. The source Master and Master prompt will be listed in the first two columns, with the Section and Cell name or number in the third and fourth columns.
See Microsoft Office Visio 2007 SDK Documentation for more information on these elements. 10.4 Processing has FinishedOnce you have finished an operation, you will be prompted to close celMaker, or not.
April 25 Impending SP2 for Visio 2007All programs have bugs, but some bugs are more annoying than others. One such bug is the often missing ribbon UI in Excel when you generate a report from Visio. So, I was delighted when the Visio team informed me of the impending service pack 2 for Microsoft Office Visio 2007, and found that it includes a fix for this problem: ttp://blogs.technet.com/office_sustained_engineering/archive/2009/04/16/service-pack-2-for-the-2007-microsoft-office-system-due-to-ship-april-28th.aspx So, what is this bug? Well, I often run reports straight from Visio using the rudimentary report writer: Unfortunately, Visio 2007 sometimes gets upset that it did not get the Ribbon UI like Excel, Word and PowePoint, so decides that Excel should not have it also: Well, now that it has been announced that the next version of Visio will get the Ribbon, now called the Fluent UI, Visio will allow Excel to keep it’s Ribbon too! One of other fixes that stands out as overdue, is the crashing caused by the Bluetooth Add-on … that will please a lot of users! I will be installing this service pack as soon as I can…. April 17 Visio in XPS and Interesting Microsoft Office Labs ProjectsFor the past two years, I have been adding XAML-based projects to my collection, alongside the normal Visio libraries and automation code that I normally produce. The reason is quite simple : both environments have the ability of linking vector graphics and data together in an exciting, interactive and controllable way. There is a certain smartness to both with the ability to binding data to graphical appearance. XAML seems to be present in all of Microsoft’s graphic products, in the form of WPF, Silverlight .and Xps. Now, we know that there are great things to come viz-a-viz Visio and XAML in the next version, and there is Saveen Reddy,s excellent Visio Export to XAML project on CodePlex (http://visioexporttoxaml.codeplex.com/), but most people do not realise that Xps is XAML, but compressed. So, if you have Visio 2007, then you can save a document in Xps format ( see http://office.microsoft.com/en-gb/visio/HA100649931033.aspx). This should open in your browser, like this: However, Microsoft have a standalone Xps viewer available for free download as part of the Xps Essentials Pack ( http://blogs.msdn.com/xps/ ). The XPS Viewer EP includes a thumbnail viewer, which will create an interactive canvas, in which you can select which page to zoom into. The Xps Viewer EP also includes a document outliner, but this reveals a bug in the Xps file exported from Visio when you click on a page. Fortunately, it is possible to fix this error. The error can be traced to the Documents\1\Structure\DocStructure.struct file: <DocumentStructure which should become:
Note the amended OutlineTarget attributes … and to the Documents\1\FixedDoc.fdoc file: <FixedDocument xmlns="http://schemas.microsoft.com/xps/2005/06"> should become :
Note the added LinkTarget elements. It is possible to go further, and to include significant shapes as named XAML elements in the XPS file, which means that you can expand the pages in the XPS viewer to list the shapes: In fact, you can encapsulate the shape data (custom properties) as hidden elements in the Xps document, so that you could have your own viewer (say, WPF or Silverlight) that accesses the hidden elements. In this way, Xps documents can become portable data diagrams, and they can be ready to print … unlike the Save As Web from Visio. Now, the reason why I got back on to this subject recently was some great add-ons for OneNote and PowerPoint which (I think) use Xps in a manner similar to the Xps Viewer: Canvas for OneNote - http://www.officelabs.com/projects/canvasforonenote/Pages/default.aspx pptPlex - http://www.officelabs.com/projects/pptPlex/Pages/default.aspx So, this is a public call for Microsoft Office Labs to consider a similar tool for Visio! It would be really cool … and useful! March 12 Let us show you how – Visio 2007 Webcasts
February 24 Creating an Org Chart without the Org Chart WizardMicrosoft Office Visio has had an Org Chart Wizard for as long as I can remember (and I have been using Visio since 1996). It has gone through several iterations, but basically it provides a simple way to create personnel hierarchies from a variety of data sources. It even has a command line interface so that the charts can be created with a minimum of user interaction. This is great, but it is limited. Firstly, it does not take advantage of the new Link Data to Shapes and Data Graphics in Visio 207 Professional; secondly, it only does direct reports with just one type of layout; and thirdly, you cannot refresh the diagram easily. Therefore, I thought it would be interesting to overcome some of these obstacles using the new features of Visio 2007 Professional and with a little code. Visio installs a sample OrgData.xls Excel spreadsheet in the folder <Program Files>\Microsoft Office\Office12\SAMPLES\1033 by default, so I have copied this file and slightly amended it. There are plenty resources on the web to help you use the built-in Org Chart Wizard in Visio, for example : http://office.microsoft.com/en-us/visio/HA011822551033.aspx. If you follow these in instructions, then you can produce a chart similar to the one shown below. I have used Color By Value to automatically fill the shapes with different colors by Department. Applying more than the Color By Value Data Graphic can be problematical because these shapes are rigorously controlled by the OrgChart addon, and I have often seen questions about modifying the appearance or layout in the newsgroups. Customization is also complicated by the fact that there are many master shapes in the stencil, each of which can be changed to look like one of the other. For example, an Executive can become a Consultant, or a Position can become a Manager. This is done with the Change Position Type tool, but this does not magically swap one shape for another, but it just changes a property that changes the shapes appearance. You may think that this is not a problem, except that any customization requires that it be done to all of the master shapes, not just one. I slightly modified the spreadsheet to insert “mailto:” before the email address. This will enable Link Data to Shapes to automatically understand that it is a hyperlink and create one on each shape. I used Link Data to Shapes to a display the spreadsheet in an External Data Window in Visio. Then I simply drew an ellipse and modified its fill, line and shading before dragging one of the records onto it.
Once there is some data on the shape, you can use the Data Graphics in Visio 2007 Professional. I linked the Department to Color By Value again; Master_Shape to the built-in face icons, the Office_Number to a circle at the bottom, and Title, Name and Department as three lines of text in the center of the shape. The MailTo values automatically create an hyperlink on each shape, as hoped. After showing the Document Stencil, I dragged the shape onto it, and named the new Master as Person. You can then use this Person master to drag and drop the records from the External Data Window onto the Visio page. Interesting, but not a very pretty organization chart.
Now comes the clever(ish) bit. The data recordset in the External Data Window is accessible by code. Therefore, you can loop through the records, get the employee name, then check which other employees report to this employee. Having got the sub-ordinate employees, you can add a connector between them. Just for good measure, I take the opportunity to name the shapes, as I loop through them. This makes the Drawing Explorer Window usable. The download includes the ConnectSubordinates sub routine in the ConnectShapes module with its support functions, getColumnIndexByName; and IsArrayAllocated.
So, now we have a connected diagram. Not very pretty, yet, but it is connected. You can manually use Shape / Configure Layout to alter the appearance of the chart
Alternatively, you can automate the layout with code. I have included macros in the LayoutShapes module for changing the appearance in the download, for example, LayoutPageCircular creates a diagram like this: Or LayoutPageCompactTree and LayoutPageRadial creates diagrams like these:
You can now choose the type of chart to suit your requirements, and, of course, Visio will automatically optimize the layout if you add in extra matrix reporting. I have included a short macro, DeleteConnectors, so that the links can be recreated when the data is refreshed. Of course, all of this can be fully automated, along with publishing to the web, PDF or Xps. The sample files can be downloaded from here:
http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/LinkDataOrgChart.vsd http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ORGDATA.XLS |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|