<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type='text/xsl' href='http://bvisual.spaces.live.com/mmm2008-07-24_12.50/rsspretty.aspx?rssquery=en-US;http%3a%2f%2fbvisual.spaces.live.com%2fblog%2ffeed.rss' version='1.0'?><rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:msn="http://schemas.microsoft.com/msn/spaces/2005/rss" xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>bVisual: Blog</title><description /><link>http://bVisual.spaces.live.com/blog</link><language>en-US</language><pubDate>Fri, 15 Aug 2008 09:15:47 GMT</pubDate><lastBuildDate>Fri, 15 Aug 2008 09:15:47 GMT</lastBuildDate><generator>Microsoft Spaces v1.1</generator><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><cf:parentRSS>http://bVisual.spaces.live.com/feed.rss</cf:parentRSS><live:type>blog</live:type><live:identity><live:id>3697690708899476393</live:id><live:alias>bVisual</live:alias></live:identity><image><title>bVisual: Blog</title><url>http://blufiles.storage.live.com/y1p2Am1BXOeDQqq0IfYmlPTh_Le4oMRx6slcq5DLhBOoPMC7ENH2_wPZJrHBjS5bcc3</url><link>http://bVisual.spaces.live.com/blog</link></image><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="typelabel" label="Type" /><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss" element="tag" label="Tag" /><cf:group element="category" label="Category" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /><cf:sort ns="http://purl.org/rss/1.0/modules/slash/" element="comments" label="Comments" data-type="number" /></cf:listinfo><item><title>Hyperlinks to SharePoint Lists from Visio Shapes</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!559.entry</link><description>&lt;p&gt;My previous post showed how to link Visio Timelines to a SharePoint Calendar ( &lt;a title="http://bvisual.spaces.live.com/blog/cns!3350D61BC93733A9!552.entry?wa=wsignin1.0" href="http://bvisual.spaces.live.com/blog/cns!3350D61BC93733A9!552.entry?wa=wsignin1.0"&gt;http://bvisual.spaces.live.com/blog/cns!3350D61BC93733A9!552.entry&lt;/a&gt; ), and I glibbly mentioned how you can create hyperlinks automatically on the shapes from the SharePoint list.  Well, that was true, but the example shown goes to a SharePoint page, and it didn’t work.  So, I feel I need to demonstrate a fix for it. &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1p0We80AIOfWq7eICTooMiMdCRfbbIqVzlo27iNJVC4D8DZBgvLdJuSIixQiq2kseH_xyqxVky-9I?PARTNER=WRITER"&gt;&lt;img title=image style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height=286 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pK3stTDr7GWVvyplpjJYbU_mjtG_UBuF6IrfjDrqmE_P6oBvKI42VT_r5K_SSFXawxAEH_1cAPcKsF7uLCFeOSw?PARTNER=WRITER" width=604 border=0&gt;&lt;/a&gt;  &lt;p&gt;The ShapeSheet formula in the hyperlink address cell is: &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pV4WQIMqHa88hKgyhBiU-0_W4lv0TslLpkxuyUWVWLSLrfkWYFToGFHgbdxI3Fr2yWnFeu6rMtU0?PARTNER=WRITER"&gt;&lt;img title=image style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height=47 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pd5kyeBMt2H_xdtu4Z6ltEoHG04RfEz0Syyzkv2A1XeoKov2wJCjvhrVJzBdKjvXUQ3gzUBLpQFM?PARTNER=WRITER" width=605 border=0&gt;&lt;/a&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;=SETATREF(Prop._VisDM_Encoded_Absolute_URL)&lt;/font&gt; &lt;p&gt;This translates to the URL: &lt;p&gt;&lt;a title="http://www.wssdemo.com/Lists/Calendar/1_.000" href="http://www.wssdemo.com/Lists/Calendar/1_.000"&gt;http://www.wssdemo.com/Lists/Calendar/1_.000&lt;/a&gt; &lt;p&gt;Well, this does not actually work from Visio, but, navigating to the entry in the SharePoint calendar shows that the actual URL is: &lt;p&gt;&lt;a title="http://www.wssdemo.com/Lists/Calendar/DispForm.aspx?ID=3&amp;amp;Source=http%3A%2F%2Fwww%2Ewssdemo%2Ecom%2FLists%2FCalendar%2Fcalendar%2Easpx%3FCalendarDate%3D25%252F12%252F2006" href="http://www.wssdemo.com/Lists/Calendar/DispForm.aspx?ID=3&amp;amp;Source=http://www.wssdemo.com/Lists/Calendar/calendar.aspx%3FCalendarDate%3D25%252F12%252F2006"&gt;http://www.wssdemo.com/Lists/Calendar/DispForm.aspx?ID=3&amp;amp;Source=http%3A%2F%2Fwww%2Ewssdemo%2Ecom%2FLists%2FCalendar%2Fcalendar%2Easpx%3FCalendarDate%3D25%252F12%252F2006&lt;/a&gt; &lt;p&gt;… and this can be reduced to: &lt;p&gt;&lt;a title="http://www.wssdemo.com/Lists/Calendar/DispForm.aspx?ID=3" href="http://www.wssdemo.com/Lists/Calendar/DispForm.aspx?ID=3"&gt;http://www.wssdemo.com/Lists/Calendar/DispForm.aspx?ID=3&lt;/a&gt; &lt;p&gt;So, how can we correct the URL for the Visio shapes? &lt;p&gt;We will need to write a little bit of code to change the formula in the hyperlink Address cell to : &lt;p&gt;&lt;font face="Courier New"&gt;=REPLACE(Prop._VisDM_Encoded_Absolute_URL,LEN(Prop._VisDM_Encoded_Absolute_URL)-4-LEN(FORMAT(Prop._VisDM_ID,&amp;quot;#&amp;quot;)),LEN(FORMAT(Prop._VisDM_ID,&amp;quot;#&amp;quot;))+5,&amp;quot;DispForm.aspx?ID=&amp;quot;&amp;amp;FORMAT(Prop._VisDM_ID,&amp;quot;#&amp;quot;))&lt;/font&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;p&gt;This will change the URL to actually open the SharePoint page, like this: &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pKWWMzt-84i8Vnz1Imq0g_PWWfEFU1n7vbTdeyKRAUNZzpLecsDXAw63YHkM_Mz0zguxjaU-QcBgmTDv7c9JdHw?PARTNER=WRITER"&gt;&lt;img title=image style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height=396 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pPTtO3nmMHbu7kuSXWYZ-POFcOn557F-PqMdl99RABwoKng9iiw4Ow5zGtH0ODVJiiLvMlaw1fJx3PuvPDDeclw?PARTNER=WRITER" width=602 border=0&gt;&lt;/a&gt; &lt;p&gt;I will write the code when I can get my Office programs working again….&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Hyperlinks+to+SharePoint+Lists+from+Visio+Shapes&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!559.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!559.entry</guid><pubDate>Fri, 25 Jul 2008 15:02:49 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!559/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!559.entry#comment</wfw:comment><dcterms:modified>2008-07-25T15:02:49Z</dcterms:modified></item><item><title>Using SharePoint Calendars with Visio Timelines</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!552.entry</link><description>&lt;p&gt;I was recently asked if it is possible to use SharePoint calendars with Visio Timeline Shapes automatically.  My first reaction was &lt;em&gt;“not without code”,&lt;/em&gt; but a closer inspection reveals that you can use Visio 2007 Professional Link Data to Shapes quite easily…. &lt;p&gt;Firstly, I found the WSS Demo site &lt;a title="http://www.wssdemo.com/application/default.aspx" href="http://www.wssdemo.com/application/default.aspx"&gt;http://www.wssdemo.com/application/default.aspx&lt;/a&gt; to be useful. &lt;p&gt;In Visio 2007 Professional, you can use Data / Link Data to Shapes … to get data from Microsoft Windows SharePoint Services:  &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pCIdICtRx-AbdSObt2HHCTchggV93W7a02wvgVjkHwJxhi-ejgH6a0cXuww7huKS5?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=331 alt=image src="http://blufiles.storage.msn.com/y1pSM3Byiyr2F_BP_0zDl17sN4oqloo7OaWQPqZsg4dS-pvkNDHvHsweRKe1Q4oQWS4?PARTNER=WRITER" width=445 border=0&gt;&lt;/a&gt;  &lt;p&gt;Then enter &lt;a href="http://www.WSSDemo.com"&gt;http://www.WSSDemo.com&lt;/a&gt; (or your own) as the Site. &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pA8JIKEHV_crBlHTZ1y0pL7QE_h-mydb0JvXYTAUKt-BmLQ8sZYDlJQ30uL0FfcHz?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=329 alt=image src="http://blufiles.storage.msn.com/y1pAHF62Z6QbSl-EJyiz5oC0b7DXXglFeolYruC2mGdsd-j4CKhgtW7b7XlsMD9XdAU?PARTNER=WRITER" width=445 border=0&gt;&lt;/a&gt;  &lt;p&gt;And login of course, in this case the password is pass@word1. &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pC3V5dkCX3jotocdt-BlmnN60KHtrG4S855hb2JqCYefvflDHddhncy1fI6T5cbn1?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=248 alt=image src="http://blufiles.storage.msn.com/y1pgfU8m8FUdCM_UoYDmxDo0aUe0A5I_19oe2xmcP5t-FZ_QPAt27VHzo8NM7IzTMPZ?PARTNER=WRITER" width=281 border=0&gt;&lt;/a&gt;  &lt;p&gt;Then select the &lt;strong&gt;Calendar&lt;/strong&gt; list: &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pp-KlEdC7z04uv6FszciNJuW7R0RpjV4g3NPtOiXq3kVr5ZQ8vhZfJStt5WfqnZl-?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=325 alt=image src="http://blufiles.storage.msn.com/y1pv1SR6fGA59c0sQ67FIrThX3CZB0yn7zOoIiwf9w1LfxxXbpmPhbbpFc9KQzcbvWU?PARTNER=WRITER" width=440 border=0&gt;&lt;/a&gt;  &lt;p&gt;Now, you need to rename the &lt;em&gt;Title&lt;/em&gt;, &lt;em&gt;Start Time&lt;/em&gt; and &lt;em&gt;End Time&lt;/em&gt; columns by selecting &lt;em&gt;Column Settings …&lt;/em&gt;  on the right mouse menu of the External Data window… &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pOIDXxK2Ftkvok9Wnn8uNYZM6ABGnbzRkA7W3IcWdTXJD8hnLNiUlYKiTcwaw6MGzcQN2Ai2POg8?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=297 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pVooR44M6vASrzc9NRLAcJuJT6XY3P2l2doFjJydKb-Z-Vyd_bQBKmZMeGkw-gAPEifeBOR8rKu-WNFAyMTFyXw?PARTNER=WRITER" width=607 border=0&gt;&lt;/a&gt;  &lt;p&gt;.. to &lt;em&gt;Task Name&lt;/em&gt;, &lt;em&gt;Start&lt;/em&gt; and &lt;em&gt;Finish&lt;/em&gt; .  This is important, because this will be used to match the values from the calendar to the shape properties. &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pzOjPR5sbzvIg7AHksSpOVcE6SYCEiODW-DgBvvHlVQdBTf68RVktEU5_XnCDJ3z4yM7etV0aA5s?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=230 alt=image src="http://blufiles.storage.msn.com/y1pqqgVuwmLckaIux01OhYIiIoXFSfrBuN_huzDfRGoYldju47gtLAxpbf3AK_PuvlVf4GjkpR-Zmo?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt;  &lt;p&gt;Drag and drop a Timeline shape, and set the Start and Finish to your requirements…. &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1phH6VnvBZbYvDxb8U-KeDr2o_rQl5JsbBWY_zaWIGpob7Xl98zgcLRBj73Yk8GevxuCg2aZx-8UnGk9oNf_xbLw?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=295 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pSJemYYyzOkJ4VLRtrolaWoeRqD2n7ylYfCI3RRAMt-eXUHsshLCma7AtLxi-BlcyOIXSoaBJeM3pn3xyK2GQog?PARTNER=WRITER" width=602 border=0&gt;&lt;/a&gt;  &lt;p&gt;Then, select an Interval shape in the stencil, and drag a row from the External Data window, and drop it on the page (not over the Timeline itself). The &lt;em&gt;Configure Interval&lt;/em&gt; dialogue will popup, which you can just OK. &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pIHl1mhoIdWYWlI5LEoKXJ2YvJaT0e_swIdMYr0h4Or7X2mJ9pVEYXVkedGpJfHCM-QlqUCgTpuXfAmU5niqdhw?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=290 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pO0ZdYynbitGMZkirvPO63S9_ZXPpVSeff7PPMgFbszFKc6RzCAViyaVisI_rLv8wb0zH3UGFILC_ZmPKYF6VeA?PARTNER=WRITER" width=608 border=0&gt;&lt;/a&gt; &lt;p&gt;In addition to the three columns that we previously mapped, all of the other columns will be automatically added as  extra Shape Data rows on each shape. &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pOf7tolafj5Q2012YZgHClndpuLQv3sJFhgt3pKJ4XrOkoV1zhpfRkDLqsV4H_44vyfqSqePRMyzFCh9EiaudYw?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=229 alt=image src="http://blufiles.storage.msn.com/y1pwSObJ4YwKgJXZqoMcSavncpeFgsWf3bzovVlnF4zkFIP_nL2hLdPfZ6guYhw8EJKENnCm-Lm_PM?PARTNER=WRITER" width=484 border=0&gt;&lt;/a&gt;  &lt;p&gt;Of course, you can use Milestones or Intervals…. &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pd2fEcK4z2lMVNj-YdDMRZEVBWq-izoNzGoxKXw_kvjsnZ5yNPaclvRXndgo2H6YZPYqjKqQGYvXO1Db1Og_MNg?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=276 alt=image src="http://blufiles.storage.msn.com/y1puNJA-VDHuEf15UJ2AqjhGC3-9dUXA_Q9grKFubkdgu0D_8bJcr07zcRhzb5Su7jAE2VBVGuUeq0?PARTNER=WRITER" width=597 border=0&gt;&lt;/a&gt;  &lt;p&gt;Q.E.D. &lt;p&gt;Post script: &lt;p&gt;The sample data happens to include hyperlinks as text, but you can ensure that Visio interprets them as real hyperlinks by checking the &lt;em&gt;Hyperlink&lt;/em&gt; box on the Types and Units dialogue opened from the&lt;em&gt; Data Type…&lt;/em&gt; button on the &lt;em&gt;Column Settings&lt;/em&gt; dialogue. &lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pOiF-oCanI-_uHUCvTS7ZAN617kfpZ0Oorknhbh29QmueMhwT3a7QhycErNLciqPU_BUs_wLe1ebeI9nhi0CfAQ?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=229 alt=image src="http://blufiles.storage.msn.com/y1p3XpsmnpTgfzCDqYRZFV6C2tQvPMXzkw5rB9-2tzyuN1piR3qZz4Lh4N5QcEH9wHNeVuIcWy4M0U?PARTNER=WRITER" width=447 border=0&gt;&lt;/a&gt;  &lt;p&gt;You will then get hyperlinks on your shapes!  And you can have multiple ones per shape! &lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pRr79SI0bNXYArq7l5Bm1sTSrQF1zTtI427N5BnySvmq1z3N53WRFb_dtSpyHqQJr53_Dew2C-Oc?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=145 alt=image src="http://blufiles.storage.msn.com/y1p_hMeDdvMDt9L4LDz_qtpUrZDz6skzahyIxN24WgjoAD5M5lmlsugmPhXRYWtjidMnt4KsYNsDR0?PARTNER=WRITER" width=266 border=0&gt;&lt;/a&gt;  &lt;p&gt;Ye gads … Visio is cool!&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Using+SharePoint+Calendars+with+Visio+Timelines&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!552.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!552.entry</guid><pubDate>Thu, 24 Jul 2008 08:42:03 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!552/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!552.entry#comment</wfw:comment><dcterms:modified>2008-07-24T08:42:39Z</dcterms:modified></item><item><title>Flags of the World</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!521.entry</link><description>&lt;p&gt;I was recently asked how to add a country flag to Visio Org Chart shapes automatically.  Well, as I am currently working with world data at the moment, I have taken up the challenge.  Firstly, the CIA have an excellent source of information, called the World Factbook ( &lt;a title="https://www.cia.gov/library/publications/the-world-factbook/" href="https://www.cia.gov/library/publications/the-world-factbook/"&gt;https://www.cia.gov/library/publications/the-world-factbook/&lt;/a&gt; ).  You can find all sorts of information about every country in the world, including, of course, their flags.  There are over 240 countries at the moment, and there are various codes used by different systems to identify them.  Even the name may not be the same, for example, do I live in UK, United Kingdom, Great Britain, United Kingdom of Great Britain and Northern Ireland or just plain old England?  Answers on a post card, please, addressed to …..? 
&lt;p&gt;Alternatively, a country can be identified accurately with a code, but you need to know which system is being used.  United Kingdom can be identified by GB in the Iso 2 character system, or 826 in the Iso numeric system, or UK in the FIPS 10 system.  The CIA World Factbook utilises the FIPS 10 code, so consequently, all of the country related web pages and images are coded with this system. 
&lt;p&gt;I have already created an Access database with all this information, so I decided to use this knowledge to create a Flags of the World Visio Master. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pX28rybzD8B84a-YwSPcArnxwTOIg8v5azRdeCVNxkk92Wtor0nA8RF4yIkXnnDk82LxMuG1wjAw?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=445 alt=image src="http://j8ysfq.blu.livefilestore.com/y1phd1HfxvrIfNNy3JunEI2iGTeGCdVlaeFSpexZmauGEvff_AXUmYoka0yZt3gG3_KbKRvwjscwmBKrvehgH04TQ?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I wrote some VBA to download the gif files from CIA website, and imported them into a specially prepared group shape.  Each image shape was automatically named with the FIPS 10 code, and the Width and Height formulae were written to be 0 if the parent group shape does not represent relevant country. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pKliQQjE_NqBnqjwEKeOZlu3bP979OPe29iliGf49_7dqXBnfBdjDk9-N411s9V_uiqcOzvaT7_d4JHzCpAXnXQ?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=442 alt=image src="http://j8ysfq.blu.livefilestore.com/y1p2Z-J9WyBMPfpzRSzOfm5DeGRM8rMN4M2E_nx3E9EvaYXzM_aQdcF7acG1XO9qE3hOIfBEHqy8vLYbtJyveq9xg?PARTNER=WRITER" width=612 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The ShapeSheet of the parent shape was loaded with semi-colon separated lists of country related data, mainly pulled from the CIA website.  The Prop.Country Shape Data row is a fixed list so that the user can select a country by its name.  The other Shape Data rows are all guarded because their values are pulled via the Index of selected country name, from the User defined cells. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pmKK5JjkyfmatZnOikSWULWxBYywOOIcc_7I9BsA3_OHrHgwbrfMDAyqfcV_FvaesVQ9gpKvgUy0KQtFCMgcI6A?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=469 alt=image src="http://j8ysfq.blu.livefilestore.com/y1p4uSZ3x8CnPxQuGg_KnULRDClqpmnaUuZ6Yj6ZgRyiqSvuqch7b3o2gCJRM__qRb43A0KGvHMQWV9qTNz2_GFiw?PARTNER=WRITER" width=611 border=0&gt;&lt;/a&gt; 
&lt;p&gt;ShapeSheet of the GB sub-shape, below, showing that the Width and Height is 0, if the shape Name is not equal to the Prop.Fips10 value in the parent shape.  Notice that the Width and Height formulae maintain the original aspect ratio of the flag image. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1p0Exnm2D1mOVZS8N61M6krlYcTGoqpMxaL5R36UUhKtxdNNSFjjBi45uC4wZHUOaWW1WFjjJdUcQvyCQuc4Yxeg?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=122 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pjzNmhcmmF9fzsOGsgOT_VHderrRrroJUVaM-FUPXtPGO3zd4EN-IlA5YHTVTZ6q1Rnx8p-DNpggrScnNDWovGg?PARTNER=WRITER" width=608 border=0&gt;&lt;/a&gt; 
&lt;p&gt;This provides a Flags of the World Master, but I also created a Flags of the World Small Master because the first one uses the large flag images from the CIA website, but the second one uses the small image files, and thus uses less file size. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1psN840I9oAfLl5gTNcURJKS4DBBQvvPO-i_ylVze_wkI1B2DG3jnclGEGf05xFQWCUR7DSYCeftj3ZNyoGesDLg?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=431 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pnuo6_GgHpgZjvcyJ0bYZweL3bSNlqq7Z5txKON8uFxljwTfIAZNVOa-7o-r5P0jblu350Vvl1kRO5_oe-rfGkg?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I have also added context sensitive hyperlinks to the CIA website, Maps Live, Google Maps and Google Earth, and one to bVisual’s website…. 
&lt;p&gt;OK, now we are halfway there … we actually want to apply the map icon to any shape that has a Shape Data value that is a country name, but we don’t know the name of this Shape Data row in advance…. 
&lt;p&gt;Visio 2007 Professional Data Graphics has Icon Sets, but you can only have a maximum of 5 icons in each set … certainly not enough for over 240 countries.  So, why not use an Icon Set as a placeholder for a country flag, then replace the Icon Set image with the flag for the country whose value is in the Shape Data row specified by the Icon Set Graphic Item? 
&lt;p&gt;That is exactly what I did in the screen-shot below: 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1ps7ZJu2f8wAdSRtJiHLY8BlbaHHavWiqaVokV-VUbEXXBNgOFtLfr0RDxru4DTlmOaO1hQd9kK0b71vJQNPlxzQ?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=408 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pu3nTrn-P6bPELedFw8R9BmY0Kk6Iyjk7fg51uuKYh_T9pGwMbbU_AKw5nJDTSZVkIEiZtxibPyou4pnO42zNLA?PARTNER=WRITER" width=605 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I duplicated an existing Icon Set (Trend Arrow 1) in the Drawing Explorer, renamed it as &lt;strong&gt;FlagPlaceholder&lt;/strong&gt;, then amended it to have one image sub-shape, called &lt;strong&gt;Flag&lt;/strong&gt;. 
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1psv3Wo1fAOlYwCiayZWmhi2xHoxozhr-G1R69ynFv9weW1Zb8teXKfcmzuLXH52U5aFUXJ_rwPyy0ohYig0pD2w?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=251 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pKdi4Oe2Mx8SWi74gdV57Xyss_AhNELsd-_df9TH13calSYq2yXz2Kc5tFF3j1KIvGWBW7Rl51bn-CNkKu6uTiQ?PARTNER=WRITER" width=607 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Thus the Icon Set becomes available in the Data Graphics editor, and you can select the Shape Data row that contains the name of the country.  You only need to have one qualifying value, so I entered &lt;strong&gt;does not contain *&lt;/strong&gt; , because I assume that there is no country in the world with that character in its name. 
&lt;p&gt;The attached stencil, &lt;strong&gt;FlagsOfTheWorld.vss &lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/FlagsOfTheWorld.zip" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/FlagsOfTheWorld.zip"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/FlagsOfTheWorld.zip&lt;/a&gt; &lt;/strong&gt;, includes the macro UpdateFlags, which will then change the flag for each selected shape. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pAPRxd6EdslR5H6KqmZYWan71KunZADzGlkJ99eY8_HrLt98BDSLW1sVPI0n5aKJj33OKV4lJvFo?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=581 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pvSUlSgwzpLNy4_UC2USjUt5TCTLcHmdcLfr7rHsR3hQa1BvskeliEWJxBmIEk71JNnHRrMmN_eN80hpi9WDaqQ?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;So, when the macro is run, the test shapes now show the flags for each country…. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pxqLA5kIN6Lz7H8Qx7_63pj4WKBUNq43hnC2q_iv03itwTM0BmBmh6BZ_1PubpOOJvGU5uF5MstM?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=497 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pHXq1jYQomYSKGc2O4yUmxNRDKgVLp0yGKsFxxUeGERU8-yNcHXFCKvuunTrpfWpKa7VZjPLr7tDmVJD8sXupgA?PARTNER=WRITER" width=608 border=0&gt;&lt;/a&gt; 
&lt;p&gt;&lt;font color="#000080"&gt;Option Explicit&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;'David Parker&lt;br&gt;'July 2008&lt;br&gt;'No warranties at all with this code&lt;br&gt;'Use at you own risk&lt;/font&gt; 
&lt;p&gt;&lt;font color="#000080"&gt;Public Sub&lt;/font&gt; UpdateFlags()&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; shp As Visio.Shape&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; subshp As Visio.Shape&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; imgshp As Visio.Shape&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; flagExists &lt;font color="#000080"&gt;As Boolean&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; cel As Visio.Cell&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; celPrecedent As Visio.Cell&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; aryPrecedents() As Visio.Cell&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; country&lt;font color="#000080"&gt; As String&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; aryCountries() &lt;font color="#000080"&gt;As String&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; aryCodes() &lt;font color="#000080"&gt;As String&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; mstFlag As Visio.Master&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; code &lt;font color="#000080"&gt;As String&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; idx &lt;font color="#000080"&gt;As Integer&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; filePath &lt;font color="#000080"&gt;As String&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; flagShp As Visio.Shape&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; shpWidth &lt;font color="#000080"&gt;As Double&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; shpHeight &lt;font color="#000080"&gt;As Double&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; shpAspectRatio &lt;font color="#000080"&gt;As Double&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; flagWidth &lt;font color="#000080"&gt;As Double&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; flagHeight &lt;font color="#000080"&gt;As Double&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; flagAspectRatio &lt;font color="#000080"&gt;As Double&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; cloneShp As Visio.Shape&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; cloneMst As Visio.Master 
&lt;p&gt;&lt;font color="#000080"&gt;On Error Resume Next&lt;/font&gt;&lt;br&gt;    &lt;font color="#000080"&gt;Set&lt;/font&gt; mstFlag = ThisDocument.Masters(&amp;quot;Flags Of The World&amp;quot;)&lt;br&gt;    &lt;font color="#000080"&gt;If&lt;/font&gt; mstFlag &lt;font color="#000080"&gt;Is Nothing Then&lt;/font&gt;&lt;br&gt;        &lt;font color="#000080"&gt;Exit Sub&lt;/font&gt;&lt;br&gt;    &lt;font color="#000080"&gt;Else&lt;/font&gt;&lt;br&gt;        aryCountries = Split(mstFlag.Shapes(1).Cells(&amp;quot;Prop.Country.Format&amp;quot;).ResultStr(&amp;quot;&amp;quot;), &amp;quot;;&amp;quot;)&lt;br&gt;        aryCodes = Split(mstFlag.Shapes(1).Cells(&amp;quot;User.Fips10&amp;quot;).ResultStr(&amp;quot;&amp;quot;), &amp;quot;;&amp;quot;)&lt;br&gt;    &lt;font color="#000080"&gt;End If&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;    'Need a temporary writeable file need&lt;br&gt;    'You may need to change this but it needs to be gif extension&lt;/font&gt;&lt;br&gt;    filePath = Replace(Replace(ThisDocument.FullName, &amp;quot;.vss&amp;quot;, &amp;quot;.gif&amp;quot;), &amp;quot;.vsd&amp;quot;, &amp;quot;.gif&amp;quot;)&lt;br&gt;    &lt;font color="#008000"&gt;'Get the current shape(s)&lt;/font&gt;&lt;br&gt;    &lt;font color="#000080"&gt;For Each&lt;/font&gt; shp In Visio.ActiveWindow.Selection&lt;br&gt;        &lt;font color="#000080"&gt;If Not&lt;/font&gt; shp.DataGraphic &lt;font color="#000080"&gt;Is Nothing Then&lt;/font&gt;&lt;br&gt;            &lt;font color="#000080"&gt;For Each&lt;/font&gt; subshp &lt;font color="#000080"&gt;In&lt;/font&gt; shp.Shapes&lt;br&gt;                &lt;font color="#000080"&gt;If &lt;/font&gt;subshp.CellExists(&amp;quot;User.msvCalloutType&amp;quot;, Visio.visExistsAnywhere) &amp;lt;&amp;gt; 0 &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;                    &lt;font color="#000080"&gt;If &lt;/font&gt;subshp.Cells(&amp;quot;User.msvCalloutType&amp;quot;).ResultStr(&amp;quot;&amp;quot;) = &amp;quot;Icon Set&amp;quot; &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;                        &lt;font color="#008000"&gt;'We know that this shape is an Icon Set&lt;/font&gt;&lt;br&gt;                        &lt;font color="#000080"&gt;If&lt;/font&gt; subshp.Name = &amp;quot;FlagPlaceholder&amp;quot; &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                            'We know that the FlagPceholder exists&lt;br&gt;                            'Get the shape aspect ratio&lt;/font&gt;&lt;br&gt;                            shpWidth = subshp.Cells(&amp;quot;Width&amp;quot;).ResultIU&lt;br&gt;                            shpHeight = subshp.Cells(&amp;quot;Height&amp;quot;).ResultIU&lt;br&gt;                            shpAspectRatio = shpWidth / shpHeight&lt;br&gt;                            &lt;font color="#000080"&gt;For Each&lt;/font&gt; imgshp&lt;font color="#000080"&gt; In&lt;/font&gt; subshp.Shapes&lt;br&gt;                                &lt;font color="#000080"&gt;If&lt;/font&gt; imgshp.Name = &amp;quot;Flag&amp;quot; &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                    'Found the Flag shape&lt;/font&gt;&lt;br&gt;                                    &lt;font color="#000080"&gt;Set&lt;/font&gt; cel = subshp.Cells(&amp;quot;User.msvCalloutIconNumber&amp;quot;)&lt;br&gt;                                    &lt;font color="#000080"&gt;If&lt;/font&gt; UBound(cel.Precedents) = 1 &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                        'Get the value in the precedent cell&lt;/font&gt;&lt;br&gt;                                        aryPrecedents() = cel.Precedents&lt;br&gt;                                        &lt;font color="#000080"&gt;Set&lt;/font&gt; celPrecedent = aryPrecedents(1)&lt;br&gt;                                        country = celPrecedent.ResultStr(&amp;quot;&amp;quot;)&lt;br&gt;                                        idx = getLookup(country, aryCountries)&lt;br&gt;                                       &lt;font color="#000080"&gt;If&lt;/font&gt; idx &amp;gt; -1 &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                            'We found a match for the country name&lt;/font&gt;&lt;br&gt;                                            code = aryCodes(idx)&lt;br&gt;                                            &lt;font color="#000080"&gt;If&lt;/font&gt; Len(Dir(filePath)) &amp;gt; 0 &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                                'Clear the temp file&lt;/font&gt;&lt;br&gt;                                                &lt;font color="#000080"&gt;Kill&lt;/font&gt; filePath&lt;br&gt;                                            &lt;font color="#000080"&gt;End If&lt;br&gt;&lt;/font&gt;                                            &lt;font color="#000080"&gt;Set&lt;/font&gt; cloneShp = mstFlag.Shapes(1).Duplicate&lt;br&gt;                                            cloneShp.Cells(&amp;quot;Prop.Country&amp;quot;).FormulaU = &amp;quot;=&amp;quot;&amp;quot;&amp;quot; &amp;amp; country &amp;amp; &amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;br&gt;                                            cloneShp.Shapes(code).Export filePath&lt;br&gt;                                            cloneShp.Delete&lt;br&gt;                                            &lt;font color="#000080"&gt;If&lt;/font&gt; Len(Dir(filePath)) &amp;gt; 0 &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                                'Remove the previous flag&lt;br&gt;                                                'Temporarily unlock the group&lt;/font&gt;&lt;br&gt;                                                subshp.Cells(&amp;quot;LockGroup&amp;quot;).FormulaU = 0&lt;br&gt;                                                imgshp.Delete&lt;br&gt;                                                &lt;font color="#000080"&gt;Set&lt;/font&gt; flagShp = subshp.Import(filePath)&lt;br&gt;                                                flagShp.NameU = &amp;quot;Flag&amp;quot;&lt;br&gt;                                                flagShp.Name = &amp;quot;Flag&amp;quot;&lt;br&gt;&lt;font color="#008000"&gt;                                                'Get the flag aspect ratio&lt;/font&gt;&lt;br&gt;                                                flagWidth = flagShp.Cells(&amp;quot;Width&amp;quot;).ResultIU&lt;br&gt;                                                flagHeight = flagShp.Cells(&amp;quot;Height&amp;quot;).ResultIU&lt;br&gt;                                                flagAspectRatio = flagWidth / flagHeight&lt;br&gt;                                                &lt;font color="#000080"&gt;If&lt;/font&gt; shpAspectRatio &amp;gt; flagAspectRatio &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                                    'Maximise height of flag&lt;/font&gt;&lt;br&gt;                                                    flagShp.Cells(&amp;quot;Height&amp;quot;).FormulaU = &amp;quot;=&amp;quot; &amp;amp; shp.NameID &amp;amp; &amp;quot;!Height&amp;quot;&lt;br&gt;                                                    flagShp.Cells(&amp;quot;Width&amp;quot;).FormulaU = &amp;quot;=Height * &amp;quot; &amp;amp; flagAspectRatio&lt;br&gt;                                                &lt;font color="#000080"&gt;Else&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                                    'Maximise width of flag&lt;/font&gt;&lt;br&gt;                                                    flagShp.Cells(&amp;quot;Width&amp;quot;).FormulaU = &amp;quot;=&amp;quot; &amp;amp; subshp.NameID &amp;amp; &amp;quot;!Width&amp;quot;&lt;br&gt;                                                    flagShp.Cells(&amp;quot;Height&amp;quot;).FormulaU = &amp;quot;=Width / &amp;quot; &amp;amp; flagAspectRatio&lt;br&gt;                                                &lt;font color="#000080"&gt;End If&lt;br&gt;&lt;/font&gt;                                                flagShp.Cells(&amp;quot;PinY&amp;quot;).FormulaU = &amp;quot;=&amp;quot; &amp;amp; subshp.NameID &amp;amp; &amp;quot;!Height*0.5&amp;quot;&lt;br&gt;                                                flagShp.Cells(&amp;quot;PinX&amp;quot;).FormulaU = &amp;quot;=&amp;quot; &amp;amp; subshp.NameID &amp;amp; &amp;quot;!Width*0.5&amp;quot;&lt;br&gt;&lt;font color="#008000"&gt;                                                'Reset the group lock&lt;/font&gt;&lt;br&gt;                                                subshp.Cells(&amp;quot;LockGroup&amp;quot;).FormulaU = 1&lt;br&gt;                                                &lt;font color="#000080"&gt;If&lt;/font&gt; Len(Dir(filePath)) &amp;gt; 0 &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;&lt;font color="#008000"&gt;                                                    'Clear the temp file&lt;/font&gt;&lt;br&gt;                                                    &lt;font color="#000080"&gt;Kill&lt;/font&gt; filePath&lt;br&gt;&lt;font color="#000080"&gt;                                                End If&lt;br&gt;                                            End If&lt;br&gt;                                        End If&lt;br&gt;                                    End If&lt;/font&gt;&lt;br&gt;                                    flagExists = True&lt;br&gt;&lt;font color="#000080"&gt;                                    Exit For&lt;br&gt;                                End If&lt;br&gt;                            Next&lt;br&gt;                        End If&lt;br&gt;                    End If&lt;br&gt;                End If&lt;/font&gt;&lt;br&gt;                &lt;font color="#000080"&gt;If &lt;/font&gt;flagExists = &lt;font color="#000080"&gt;True Then&lt;br&gt;&lt;/font&gt;&lt;font color="#008000"&gt;                    'Move on to the next shape in the selection&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;                    Exit For&lt;br&gt;                End If&lt;/font&gt;&lt;br&gt;            &lt;font color="#000080"&gt;Next&lt;/font&gt; subshp&lt;br&gt;        &lt;font color="#000080"&gt;End If&lt;br&gt;&lt;/font&gt;    &lt;font color="#000080"&gt;Next&lt;/font&gt; shp&lt;br&gt;&lt;font color="#000080"&gt;End Sub&lt;/font&gt; 
&lt;p&gt;&lt;font color="#000080"&gt;Private Function&lt;/font&gt; getLookup(ByVal value &lt;font color="#000080"&gt;As String&lt;/font&gt;, ByVal aryIn &lt;font color="#000080"&gt;As Variant) As Integer&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; ary() &lt;font color="#000080"&gt;As String&lt;/font&gt;&lt;br&gt;    ary() = aryIn&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; i &lt;font color="#000080"&gt;As Integer&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;Dim&lt;/font&gt; found &lt;font color="#000080"&gt;As Boolean&lt;/font&gt;&lt;br&gt;    &lt;font color="#000080"&gt;For&lt;/font&gt; i = 0 &lt;font color="#000080"&gt;To &lt;/font&gt;UBound(ary)&lt;br&gt;        &lt;font color="#000080"&gt;If&lt;/font&gt; UCase(value) = UCase(ary(i)) &lt;font color="#000080"&gt;Then&lt;/font&gt;&lt;br&gt;            found = &lt;font color="#000080"&gt;True&lt;/font&gt;&lt;br&gt;&lt;font color="#000080"&gt;            Exit For&lt;br&gt;        End If&lt;br&gt;    Next&lt;/font&gt;&lt;br&gt;    &lt;font color="#000080"&gt;If&lt;/font&gt; found = &lt;font color="#000080"&gt;True Then&lt;br&gt;&lt;/font&gt;        getLookup = i&lt;br&gt;    &lt;font color="#000080"&gt;Else&lt;/font&gt;&lt;br&gt;        getLookup = -1&lt;br&gt;&lt;font color="#000080"&gt;    End If&lt;br&gt;End Function&lt;/font&gt; 
&lt;p&gt;Note : The following web site was invaluable for helping me download the flag image files from the CIA web-site : &lt;a title="http://www.vb-helper.com/howto_download_url_to_file.html" href="http://www.vb-helper.com/howto_download_url_to_file.html"&gt;http://www.vb-helper.com/howto_download_url_to_file.html&lt;/a&gt; 
&lt;p&gt;Interesting related blog: &lt;a title="http://dbwhisperer.blogspot.com/2008/07/getting-geography-data-from-visio.html" href="http://dbwhisperer.blogspot.com/2008/07/getting-geography-data-from-visio.html"&gt;http://dbwhisperer.blogspot.com/2008/07/getting-geography-data-from-visio.html&lt;/a&gt; 
&lt;p&gt;Download files : &lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/FlagsOfTheWorld.zip" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/FlagsOfTheWorld.zip"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/FlagsOfTheWorld.zip&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Flags+of+the+World&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!521.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!521.entry</guid><pubDate>Sun, 13 Jul 2008 11:33:43 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!521/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!521.entry#comment</wfw:comment><dcterms:modified>2008-07-13T20:32:41Z</dcterms:modified></item><item><title>Enhancing Visio Data Graphics Text Callouts</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!483.entry</link><description>&lt;p&gt;Visio 2007 Professional introduced the wonderful Data Graphics feature to display Shape Data in a clear visual way, but it is not clear how you may, for example, change the font of even the simplest Graphic Item type, &lt;em&gt;Text Callouts&lt;/em&gt;.  In this blog, I’ll show you one method that I employ to vary the appearance of Text Callouts.  The same technique can be used for other Graphic Item types, Icon Sets and Data Bars. 
&lt;p&gt;I am using the  the sample &lt;em&gt;IT Asset Management&lt;/em&gt; drawing to demonstrate throughout, which can be found in the Samples Template Category.  In this diagram, the server shapes on the topology page use the &lt;em&gt;Topology 1&lt;/em&gt; Data Graphic, which can be seen in the Data Graphics panel. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1p5ml5du9jvOw0lJhq_2Do9Ixw-93ODWGVWmiBXqpkgBueg68hQhjm-IY4zY10HF9qkNmjy3BUSHBs18YV0LqCug?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=398 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etja383jXp3GvPc_Br0jqVXhpsaelf2yViiIyeoc5gzUfVq3KLVMKPTIB_HOq-bcU2RQdpDvuXoc7YFJT8_UN9wBo?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;Microsoft had to introduce a new capability in Visio 2007 in order to get Data Graphics working, namely the ability for a shape instance to hold a reference to a DataGraphic master in addition to its normal master.  So, if you open the Drawing Explorer window, you can see the normal &lt;em&gt;Server&lt;/em&gt; master, in addition to the &lt;em&gt;Topology 1&lt;/em&gt; Data Graphic master.  If you open the &lt;em&gt;Topology 1&lt;/em&gt; master, you can see the full Data Graphic, and you can expand the Master Explorer to show that there are multiple shapes inside it.  These shapes are the ones that you see displayed in a more friendly way in the Edit Data Graphic dialog. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjaMJmUjccQ2EriTFNErlIEgIt6_vwNKk9G9SKHZ0pZCz74odckouSxNMZZGZv1HWUdFTeLn3SO32tcZ7fgQf5SV?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=388 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjYdYUAV8DNp6ZMNhwmmPadx5ha8wAl2wnfuFSRpWVdJ97SDsXu-stHdbA-awzBJW2IBnmaC8ZwZoWpLX4TLUzOK?PARTNER=WRITER" width=604 border=0&gt;&lt;/a&gt; 
&lt;p&gt;However, you may also notice that this particular Data Graphic uses the same &lt;em&gt;Text callout&lt;/em&gt; Graphic Item multiple times.  This is evident if you select Edit Item for &lt;em&gt;Operating System&lt;/em&gt;, &lt;em&gt;CPU (MHz),&lt;/em&gt; &lt;em&gt;Memory (MB)&lt;/em&gt; or &lt;em&gt;IP Address&lt;/em&gt; Data Fields in the Edit Data Graphic dialog.  In fact, you can only tell which Graphic Item master is being used in the Data Graphic master in code, or by opening the ShapeSheet of each of the sub-shapes. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p-mAN70zrGh2Lkc9lgLvVIl4YXj6yZtw-DlW5LF3PcVnxhug_5J5CoDK7g0ZgPSI-C6XjsdCHxxu3dRPnVGcJaDR1Tb_HSC40?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=340 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh2bupk2OiWSOz-CYjf03h_JuWuSfypPgR25Dq73mMVQ7CclD9hPTrnykb-HKYzNMbXIkaOJQMR07yIxVP4dAIP9?PARTNER=WRITER" width=457 border=0&gt;&lt;/a&gt; 
&lt;p&gt;You can see on the Edit Text dialog that you can edit certain properties, but font is not one of them!  SO, how can you edit the font?  Well, you could go around each shape in the diagram, sub-select the shapes and change it that way, or you can create a variation of the &lt;em&gt;Text callout&lt;/em&gt; Graphic Item master. 
&lt;p&gt;In the Drawing Explorer window, select the &lt;em&gt;Text callout&lt;/em&gt; master, then Duplicate on its right mouse menu.  You can then rename the new &lt;em&gt;Text callout.xxx&lt;/em&gt; as whatever you like (I have used &lt;em&gt;Text callout A&lt;/em&gt;). 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p-mAN70zrGh2vxL63_oz5icbf8GQM9ppLnhHWsAn2XA1EQqkid0OSDR0xoi_Ta9-ikd5gSdRZcd6kwPOrI_CcrlLkvKsok3Ex?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=192 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh1UPpf3hempwvPb1MgeYY829vQPiuPZos794pKVV7QmzYT9cPvB73JdbvSWpxRegy316xOuH5hJfiho8cF66Zrx?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt;     &lt;a href="http://blufiles.storage.msn.com/y1p-mAN70zrGh0arDrUlC_BPyZ-Jg7-dWkH10ChQ0jkqXsPVewrEO7oe1NEU9Fn8Zo74aUTNvMb0NUbQHmn5xuoZmXu4Nng5Gu9?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=150 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh0Ybxnp4nsAE71T_5rtYivtkBp7zaWh8B1vaSGnAIcTwLYPjC5DJeSFr7qZRs-Txf9-LyQHEhIEDRwHApygzxtO?PARTNER=WRITER" width=227 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Once you have a copy, you can double-click (or use select Edit Master Shape from its right mouse menu).  You will see that the &lt;em&gt;Text callout&lt;/em&gt; master is comprised of two shapes, Sheet.5 (which is the group) and Sheet.6 (a sub-shape of the  group).  The &lt;em&gt;Label&lt;/em&gt; text is part of Sheet.5, whilst the value (&lt;em&gt;Abc&lt;/em&gt;) is part of Sheet.6. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjaE78ZzkiDQM_5J0il7-nLxtw7SQTbqA1bwjCf960QVp-0o38Q4B1q07QkRG6rRGFDKml-wvz3woy25rgAhMCbL?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=284 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh3GtienD2Hqm8fZUMKLjnbcI4geHUP-ajMFpHg1XYPmTVzHZr0M4aWs3imEVJ7zUlameBnxsMOPVIvYL23U3cCC?PARTNER=WRITER" width=452 border=0&gt;&lt;/a&gt;  
&lt;p&gt;You can now edit the font of either the whole lot by selecting the shape, or you can just do the value by selecting Sheet.6 in the Master Explorer window. 
&lt;p&gt;  &lt;a href="http://blufiles.storage.msn.com/y1p-mAN70zrGh3yooOLIPftcUSjaJkhaLPtKRGwEuy7zS5nGDmpLI-EFn8zRRr9bXirQxbAwiiUmM24S-dF3J0oDRSVrRZ_2msv?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=327 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh0pAiUjz9B9L_-F3pnJ-Kt1KuWXTKIOaFjj4Y9R7gsaeDlyoIZGytHcKcTRQYialaQvYD7VPrc72ap3C13CFLl6?PARTNER=WRITER" width=452 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Now, you can close the Master Edit window to save the changes. 
&lt;p&gt;Now, when you go to the Edit Data Graphic dialog for &lt;em&gt;Toplogy 1&lt;/em&gt; Data Graphic, and select Edit Item for, say, &lt;em&gt;Operating System&lt;/em&gt;, you will find your new variation, &lt;em&gt;Text callout A&lt;/em&gt;, listed. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjZ_WNQDjXG-s12eJtHcLcta4Dts1zmTK4R8pTWAPwLymDcHu4v3HpiQQRxn9n9mTMnoB5GedvqQtPO6yY1WNKyi?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=362 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh1QqO1VaqmKz353nJJoeFPAOgs6G9JIiMQXcNP0Z5o5UFR2tnC_Ruz7nDBcvxXl8a_G3OxTWLTn16dXnFG3RtTN?PARTNER=WRITER" width=592 border=0&gt;&lt;/a&gt; 
&lt;p&gt;So, when you select your new variation of &lt;em&gt;Text callout&lt;/em&gt;, all of the shapes that use it will be updated automatically! 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1p-mAN70zrGh3GHEPYsRyWk1Mp5iJBkOZMNy72xgMAcNkXZI-wIm7FjfiyVWVAJ7aK_qb6CVtHjLPF1yz3efSk89UXenO0ah5e?PARTNER=WRITER"&gt;&lt;img title=image style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=482 alt=image src="http://blufiles.storage.msn.com/y1p-mAN70zrGh10gmWgWS7Sm6EvPST_Olw_VPR1wAc6aR3cw7_IL2PMPHO6GWT7bKyuXuaiqUxhhBWrq9sCdt-TddJtciHOsnou?PARTNER=WRITER" width=592 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Q.E.D. 
&lt;p&gt;By the way, there’s more like this in my book …&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Enhancing+Visio+Data+Graphics+Text+Callouts&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!483.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!483.entry</guid><pubDate>Thu, 19 Jun 2008 08:39:49 GMT</pubDate><slash:comments>3</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!483/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!483.entry#comment</wfw:comment><dcterms:modified>2008-06-19T08:41:18Z</dcterms:modified></item><item><title>Visio FMPrint Add-on</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!442.entry</link><description>&lt;p&gt;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. 
&lt;p&gt;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: 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjbXrFmyvpDDhCMmkdP91jBaEOnfenudz_5oBAo2fywV4qWmk_3DYG8XFhtvix6-4hqzSDAoIP20vrrCx3z8LM9x?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=175 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjZI60UI-fRUJg1pUUw6qoCHL0tl3FRjk0BncQrLw9cNyGe26V_TP_M_yM7TPUxbtSkLnjl1ITSNk_yYI_bq08ey?PARTNER=WRITER" width=608 border=0&gt;&lt;/a&gt; 
&lt;p&gt;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. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjaGXmDLx2gxZpT4X-rWednAHXSxATRs16O5Ku-BEHYJ7diFH8Yq7X_fULndWKw1AfNnqxBVLWcoNN3szGaJPKwS?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=146 alt=image src="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjaWUOaEp3F3gZplCeGXk_UQGBog6kcMOEX0E8Yrn67G-Q1ngpgj9Ji2QMh5s5GZqPlA9n3_Av2-r3RgoDX3xrH9?PARTNER=WRITER" width=611 border=0&gt;&lt;/a&gt; 
&lt;h2&gt;Shape Data Rows&lt;/h2&gt;
&lt;table cellspacing=0 cellpadding=2 width=542 border=0&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign=top width=178&gt;&lt;strong&gt;Name&lt;/strong&gt; 
&lt;td valign=top width=120&gt;&lt;strong&gt;Label&lt;/strong&gt; 
&lt;td valign=top width=242&gt;&lt;strong&gt;Value&lt;/strong&gt; 
&lt;tr&gt;
&lt;td valign=top width=194&gt;visPrinterModel 
&lt;td valign=top width=128&gt;Printer Model 
&lt;td valign=top width=254&gt;&lt;em&gt;Enter manually or returned by &amp;quot;Find printer ...&amp;quot;&lt;/em&gt; 
&lt;tr&gt;
&lt;td valign=top width=198&gt;visPrinterLocation 
&lt;td valign=top width=131&gt;Printer Location 
&lt;td valign=top width=258&gt;&lt;em&gt;Enter manually or returned by &amp;quot;Find printer&lt;/em&gt; &lt;em&gt;...&amp;quot; or &amp;quot;Browse ...&amp;quot;&lt;/em&gt; 
&lt;tr&gt;
&lt;td valign=top width=199&gt;visPrinterPath 
&lt;td valign=top width=132&gt;Printer Path 
&lt;td valign=top width=259&gt;&lt;em&gt;Enter manually or returned by &amp;quot;Find printer&lt;/em&gt; &lt;em&gt;...&amp;quot; or &amp;quot;Browse ...&amp;quot;&lt;/em&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;  
&lt;h2&gt;Actions&lt;/h2&gt;
&lt;table cellspacing=0 cellpadding=2 width=594 border=0&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign=top width=67&gt;&lt;strong&gt;Name&lt;/strong&gt; 
&lt;td valign=top width=134&gt;&lt;strong&gt;Action&lt;/strong&gt; 
&lt;td valign=top width=113&gt;&lt;strong&gt;Label&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt; 
&lt;td valign=top width=52&gt;&lt;strong&gt;Tag Name&lt;/strong&gt; 
&lt;td valign=top width=58&gt;&lt;strong&gt;Button Face&lt;/strong&gt; 
&lt;td valign=top width=167&gt;&lt;strong&gt;Disabled&lt;/strong&gt; 
&lt;tr&gt;
&lt;td valign=top width=67&gt;visPrinter1 
&lt;td valign=top width=134&gt;=RUNADDONWARGS(&amp;quot;FMPrint&amp;quot;,&amp;quot;/cmd=3&amp;quot;) 
&lt;td valign=top width=113&gt;&amp;quot;Set as &amp;amp;Default Printer&amp;quot; 
&lt;td valign=top width=52&gt;&amp;quot;PRN&amp;quot; 
&lt;td valign=top width=58&gt;&amp;quot;1100&amp;quot; 
&lt;td valign=top width=166&gt;=IF(LEN(Prop.visPrinterPath)&amp;gt;0,FALSE,TRUE) 
&lt;tr&gt;
&lt;td valign=top width=69&gt;visPrinter2 
&lt;td valign=top width=135&gt;=RUNADDONWARGS(&amp;quot;FMPrint&amp;quot;,&amp;quot;/cmd=4&amp;quot;) 
&lt;td valign=top width=112&gt;&amp;quot;&amp;amp;Open print queue&amp;quot; 
&lt;td valign=top width=52&gt;&amp;quot;PRN&amp;quot; 
&lt;td valign=top width=58&gt;&amp;quot;986&amp;quot; 
&lt;td valign=top width=166&gt;=IF(LEN(Prop.visPrinterPath)&amp;gt;0,FALSE,TRUE) 
&lt;tr&gt;
&lt;td valign=top width=69&gt;visPrinter3 
&lt;td valign=top width=135&gt;=RUNADDONWARGS(&amp;quot;FMPrint&amp;quot;,&amp;quot;/cmd=2&amp;quot;) 
&lt;td valign=top width=112&gt;&amp;quot;&amp;amp;Find a printer in the directory...&amp;quot; 
&lt;td valign=top width=52&gt;&amp;quot;PRN&amp;quot; 
&lt;td valign=top width=58&gt;&amp;quot;6371&amp;quot; 
&lt;td valign=top width=166&gt;  
&lt;tr&gt;
&lt;td valign=top width=69&gt;visPrinter4 
&lt;td valign=top width=135&gt;.=RUNADDONWARGS(&amp;quot;FMPrint&amp;quot;,&amp;quot;/cmd=1&amp;quot;) 
&lt;td valign=top width=112&gt;&amp;quot;&amp;amp;Browse for a printer...&amp;quot; 
&lt;td valign=top width=52&gt;&amp;quot;PRN&amp;quot; 
&lt;td valign=top width=58&gt;&amp;quot;1745&amp;quot; 
&lt;td valign=top width=166&gt; &lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt; &lt;/h3&gt;
&lt;h3&gt;SmartTag&lt;/h3&gt;
&lt;p&gt;The visPrinter&lt;em&gt;n&lt;/em&gt; Actions appear under the SmartTag because they have the same &lt;strong&gt;TagName&lt;/strong&gt; value. 
&lt;table cellspacing=0 cellpadding=2 width=592 border=0&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign=top width=69&gt;&lt;strong&gt;Name&lt;/strong&gt; 
&lt;td valign=top width=50&gt;&lt;strong&gt;Tag Name&lt;/strong&gt; 
&lt;td valign=top width=471&gt;&lt;strong&gt;Description&lt;/strong&gt; 
&lt;tr&gt;
&lt;td valign=top width=69&gt;visPrinter 
&lt;td valign=top width=51&gt;&amp;quot;PRN&amp;quot; 
&lt;td valign=top width=471&gt;=IF(Actions.visPrinter1.Disabled,&amp;quot;Configure Printer&amp;quot;,Prop.visPrinterModel)&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;
&lt;h3&gt;Find a printer in the directory&lt;/h3&gt;
&lt;p&gt;This enables you to search your Active Directory to locate a specific printer... 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjZF-klJIQ9dbytTB0_VmxTSwFl5Qyc0_GjUTqDnyZm1ol2HgpPKip5Zj4XyLTgsVuh09bWaYO8OL7q-B2LfU842?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=265 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2gI8i_303a-T9NWO83xUM4L1f-DcUAU7z16eWAGF2kz9DdHrD3XH_bctDWg9859vrdTbCHDk6HB93rrpw2AS7T?PARTNER=WRITER" width=390 border=0&gt;&lt;/a&gt; 
&lt;p&gt;When you select one, then the Printer Model, Location and Path values are automatically filled in. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjYY5qRwiKiVtFRQSDx_M__1GHsMXeVuxpdt1e6NKjZFdxpbEBe7uCKAaPqon1bA7KKIDZ25Nri03vBAnjHlVJiv?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=181 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2quHxSrUDwq1t-doZyP5sxDGykLSNo7iPNDi4COyaObNcpggfIp5POdk7L1Jo31TF4HKWV7dGLDQ34SY299fdT?PARTNER=WRITER" width=562 border=0&gt;&lt;/a&gt; 
&lt;h3&gt;Open print queue&lt;/h3&gt;
&lt;p&gt;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... 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjbZvUEMr-Z5g8lGMoyDnVtRQZTqA1sViTi37Gxn1-cN7Vff-1RUIiopdndAuhaqJSASXadz18yMm8IAOq5-EUVv?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=153 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh1KmKn4U5Ea3NMq4YWUQhNyaTbOciqQxy-TccsDLX0OV7sJ7fAb-CNRGZYNuoz4hokIcHqdu9PA4mnhy7d90PWJ?PARTNER=WRITER" width=564 border=0&gt;&lt;/a&gt; 
&lt;p&gt;This will give you access to the printer's properties... 
&lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh2kU2Iw4LLSoRivCeRtY0SCbLt2lERCOaCU3uN60HHMeJjrRPGNfkgK1ZBMOI2HfEwxvw8ZKYTAB-Eg8VfV9GhO?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=234 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh3cgBiz0S4zsjE9QnAiUIHPgArxg0BbRPZD4iiuFBv4lQCQ6mH0IukXpkaOFcDhzf9j3IMZZUu0po3jOGNMz7Xv?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt; &lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh3OSmknf9XJF28BASCqWjyRP5N26u4AvUM4Jjo0Pa1EUvAHnk8NQJBZNQW9pmceSnFStjheg4xVAfM_75lcB8Re?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=274 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh1-0vj6XP_Ov8Qpx3VinwW4EnaWiq7azq34Ku1EZVbFKu-nW9k84QPLd6z1H-l6NFbee6Gv9s1Z8QDf5sKc_hgB?PARTNER=WRITER" width=247 border=0&gt;&lt;/a&gt; 
&lt;h3&gt;Set as Default Printer&lt;/h3&gt;
&lt;p&gt;This function does give you the ability to set the selected printer as the default, but you may get a security warning.... 
&lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh31EbvXmV1YsYn_tgUJej5vpdaafYgXGYyWonB61S4VE00-fCGPBEvWdbExEu9uO_anfcWl42asd_cYFupcvJ5_?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=97 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh0Dsv4ZQ1-xd9mM--XZPHIa2jD-tIQGkjkHN4zEqnhY9z3LkNcLYVdNLagemab7BkTkqiCa0E0ihF1KdeImgo2u?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt; 
&lt;h3&gt;Browse for printer&lt;/h3&gt;
&lt;p&gt;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. 
&lt;p&gt;&lt;a href="http://j8ysfq.blu.livefilestore.com/y1pHeOR1b4etjbe2XPxJ7t1hNvovkUv3iE46Eyk9X7UO0T-bNj8AkqwgnsoelKGCfmMISX5_L6iqdMXAaKAiTruV6_rC9y3Uicu?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=230 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh1PpxheYCbwaUunjSxC7QefLWBj6GOBWFpZXn9FdAfmDYjvi-Uds7JJiCFWz5V1L3JFuFzxiw7r39R3YMnMP76l?PARTNER=WRITER" width=291 border=0&gt;&lt;/a&gt;  
&lt;p&gt;Well, that's all I know about the FMPrint add-on ... does anyone know more?&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Visio+FMPrint+Add-on&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!442.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!442.entry</guid><pubDate>Sun, 25 May 2008 11:40:41 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!442/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!442.entry#comment</wfw:comment><dcterms:modified>2008-05-26T16:16:06Z</dcterms:modified></item><item><title>Linking Visio WBS Modeler Diagrams to Project</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!404.entry</link><description>&lt;p&gt;I have recently been asked if it is possible to update the % Complete data diagrams created with the WBS Modeler Visio 2007 Add-in (&lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=34c28a49-e14c-4a7d-8d49-90061fe08ab4&amp;amp;DisplayLang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=34c28a49-e14c-4a7d-8d49-90061fe08ab4&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=34c28a49-e14c-4a7d-8d49-90061fe08ab4&amp;amp;DisplayLang=en&lt;/a&gt;).  Well, it is always possible with custom code, but it is intended that the WBS Modeler diagrams can be refreshed using the Link Data to Shapes feature in Visio 2007 Professional.  I know this because I wrote WBS Modeler, and in this article, I will tell you how. 
&lt;p&gt;Firstly, I will use the Commercial Construction project that is installed with the Visio SDK for this example, which I show an extract from below. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOyxz15LPWePycZoycvsbSCy8V5E7LPp2w5Opl2oHz5pc5axnRTisFY3zgI_97zx9tmvMOLN1ZBtFA?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=417 alt=image src="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOwCwo8MipF3jSSPBX_gFZ4BUyZWEFWLLtDO-WFVv__pjLzqtwBU2FpWMgkympS-LSgmUQPEmU9SPQ?PARTNER=WRITER" width=602 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Then I created a new WBS Modeler diagram based on the above project. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbjmynOVAQL3lCM7cz8A2A6fK7YFv9AGkeqk_wSWWAcgzsz35Uw76DT3_qKdHlH8FGUqEyyYsnyMAckApAOF4Ia?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=387 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZ3Ad4nzF_EKowwqyu0eKiUaemfPei5_sO9QGc4jTpUG_f1Wo73xUeWi5wgjjLZrmkYTqn3OsGA45eJVXs4Ptou?PARTNER=WRITER" width=602 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I simply imported the whole project using the WBS Modeler / Import from Microsoft Office Project menu action. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZs-boPkx7oOuRBIcRm07L1qKPJNeW3sz1rjd9HETBngeAvSmx82Ntq2piDXO_jKNKaIOXubnxstmFXpgc_vpps?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=421 alt=image src="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOzxYrST7bTdqq0MrxbzkujA2nhIzFUqWyK_nVRpOWr4IG79MqWYLdJcrMZ6xDvbtSrudRX-7DbALQ?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The Element shapes are color coded according to their Outline Level by default, and they are labeled with their &lt;em&gt;Outline Number&lt;/em&gt; and a truncated version of the &lt;em&gt;Element Name&lt;/em&gt; shape data.  Notice that the Shape Data window shows more of the Project data fields than is displayed on the shape. 
&lt;p&gt;NB If you do see all of these Shape Data rows, then click on the page and ensure that the page &lt;em&gt;Hide extra Project properties&lt;/em&gt; is set to False in the Shape Data window. 
&lt;p&gt;In this particular sample project, there are no costs, nor are there any non-zero % Complete values, so I'll change some of these in the original project, then update the Visio diagram. 
&lt;p&gt;Therefore, I revealed the Unique ID, % Complete and Cost fields in Project. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbHCAw_cSbw_pzelxaqzx6LXbMZLMBDihsn-XB42K_fEzAPLcoo04aoNNWz3omoXDjdLdQGTn6uiEAbH1v4__za?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=363 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etja5-i38jSVmUmE8h_Ov6hdu9bHuZmEAJWJXPt5ZmSErda0O-ZU8xKfCRJ7eIk_j_6y5m2r_yu7pE6T9X3bODyIH?PARTNER=WRITER" width=604 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I then exported the Project tasks to Microsoft Excel using File / SaveAs and Selected Data in the Project Export Wizard. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaZ3EHfxxKKXiyh_8zVxoC46wGwomU-rPIUQnP9v-M82vKlDMY6KwN_dN_qTVHCavBNOS6H_P1Az3l30hQq5ziK?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=295 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZszl4nP2bSIEgdEf_XkmTp5ffuFkNFxPFRE4IpVrN16DYsobdv8M5tfPl0Os39k0YfTP6jv_zJmkPAMw-3QXrc?PARTNER=WRITER" width=605 border=0&gt;&lt;/a&gt; 
&lt;p&gt;You then need to select the &lt;em&gt;Unique ID&lt;/em&gt; and any other fields that you want to export. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOyc56L_YbGylDiKAA4w9KOPfPxbqXVCKzB64AqA-uBKfAxI5fwkAG8RM9Ifi30ZNGA78zSLWUxp_w?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=375 alt=image src="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOylrYHXbnTAr4AYjpqRtb1cHZPdYTpadh2HEWrDpUT-B1ND2vJllerrnrtJVx7XSma3yv4oxT2XHw?PARTNER=WRITER" width=601 border=0&gt;&lt;/a&gt; 
&lt;p&gt;You can optionally save the Map for future use, but you should end up with an Excel spreadsheet that contains the data that you requested. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn6izCirrMRFhpizW0fa1Vu6nr9QM2dj09r184nRBGviiT7pPXYXg_dvzAbAnRkRDEA?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=324 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn6n_YAUdaaDne3bIs9F8X5xEaOamsPceXvIw5olPfGG6mlcbF_4FL7yVIKttqUAyqs?PARTNER=WRITER" width=398 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Then, in Visio 2007 Professional, you can click Data / Link Data to Shapes and select the Excel workbook that you just created.  There should be just one region, &lt;em&gt;Task_Table1$&lt;/em&gt;, and you should ensure that the &lt;em&gt;Unique_ID&lt;/em&gt; column is checked. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOz5Dq8u94OOM1sVDooPLmx-B_QTMzQ1iueo1g0j3Cb_risH0X7rfe2mZp_5-rlrOoGUvOqoEX8vNA?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=272 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2EvuVHVMEnM0mMre6Ku2Ks7ZfboscnvQpD_0B-AZS40Bhsedegondd6urAdqRV3bCx1MMAe1gxX43nhdVa5ZMf?PARTNER=WRITER" width=396 border=0&gt;&lt;/a&gt; 
&lt;p&gt;When you click Finish, the Excel data is copied into the Visio document as External Data.  You must now ensure that the column labels match those on the Element shapes by opening the Column Settings dialog from the right-mouse menu of the External Data window. So, &lt;em&gt;Unique_ID&lt;/em&gt; becomes &lt;em&gt;Unique ID&lt;/em&gt; and &lt;em&gt;Percent_Complete&lt;/em&gt; becomes &lt;em&gt;% Complete&lt;/em&gt;.  This will ensure that the data is copied into existing Shape Data rows rather than creating new ones. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaUpCdqk3V06wukr69ke2nE20AvVOt2DT8SgGMVDSxRURTzNgGd9NOiydUdr_ObAS3E8gOQf2yZxldcZmxeVI_J?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=218 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaGU5LHEiXAlAbU-MSqTRlQZtM1CLSZd4WT07DtjKKsKbAjmAObXmCYyzeIL_5SotY3Jkc6ccMgukPb7u43_vuh?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;In addition, I changed the Data Type for the Cost field to String because my original Element shape is expecting a string. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjYGZ7kuZD860Li5cLw43P4sEaIu-bN2Rj5igRie5UPfcspqz7cSFLmM7xdxz5-DvoVQ569bAom5K2btQI9giHX_?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=182 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjYcHnXK0p3GXvQF6vpf-g45k_IvwSxj1_Id5DWzMFYo8ogXxS7UNCYAGWoOfla2p6pm7kWigHDQ3jA0fFkbeCJs?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;You can then choose &lt;em&gt;Automatically Link&lt;/em&gt; from the right-mouse menu of the External Data window, and use the &lt;em&gt;All shapes on this page&lt;/em&gt; option.  Finally, you must ensure that the Data Column &lt;em&gt;Unique ID&lt;/em&gt; equals the Shape Field &lt;em&gt;Unique ID&lt;/em&gt;. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn4lU7inNXlfBVG1XGluhZmUFEw0HG7dwVymFaqz7j6wvzArQMVOjnT_QpXCOVHqo3w?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=300 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn6bOLsYGtzSH5AhzAGuNYp9nYuScjMtCDmpxZQst65WN1zeTXvCHzfP-1_cQQyCzj4?PARTNER=WRITER" width=392 border=0&gt;&lt;/a&gt; 
&lt;p&gt;When the links have been created, you will probably think that something has gone wrong because everything has turned black. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn7CZapMuNP3kb34QfxQ-lUDnYaJ_lCkIPnTOkofRt1BVGzcA4K6ocYLQcgzvCiEX-8?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=316 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn76rAoI0JTHomXaaqpaPwI4be3f3WDUOtQZtENtIv7kv6pUvgk8XZs4IMqKl_VIQLo?PARTNER=WRITER" width=391 border=0&gt;&lt;/a&gt; 
&lt;p&gt;However, this is normal because Visio has automatically assigned a Data Graphic to all the shapes, so all you need to do is edit it.  In this example, I simply deleted the two text fields that Visio had automatically created, and then added a new Data Bars for the &lt;em&gt;% Complete&lt;/em&gt; and &lt;em&gt;Cost&lt;/em&gt; fields, and Color By Value for the &lt;em&gt;Parent Element&lt;/em&gt;. 
&lt;p&gt;I entered the Custom Formula={% Complete}*100 so that the numbers would be between 0 and 100.  You can enter these formulae by selecting More Fields at the bottom of the Data Fields drop-down list on the New Data Bar dialog. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOyODR21zFCxl1tVs-NZpY2B7SQJnUjOYnUBNKefqaD-Mk0EBNRkQqILI8JcGtRmV0XsvehxRzZVFw?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=431 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh017x3f5BFAjK29znmdB6vW9QRJKwVcPKYR7Bu0AYsJme9FFkGnGJizWouS62Vs-H7ad-KBTNQx-dDcDEQhtI1n?PARTNER=WRITER" width=595 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I also edited the Label text and selected the position to be Center/Bottom Edge. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZI7TG4usIewk3uxanZeuGU01GCvwXq9QjJkZ56civGVTHKyPDokf1eEzTMAeeGHI-Dt_LGXBMapv3KNrjZQbgC?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=403 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn40UfzrfbUBmS4UK4Ja5Z2mTjca7toalztB6QtEsgbl5-pGgPssNKxg7RFIUxBTRp4?PARTNER=WRITER" width=595 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Although I set the &lt;em&gt;Cost&lt;/em&gt; property as String for the import, Visio is still able to treat the contents as a number for the Data Graphics, so I thought a Thermometer Data Bar would be interesting.  Note that I set the Maximum Value to more than the known data values.  (See my Visio Conference blog for code on how to automatically update maxima and minima values). 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOyTdSQ4pzCLTfHgBN-v_Cll_hIoGihUMS0LOX5p_S3Ycc1Z8S44smRnNG1VBTbwBxXsvXnHbaFzJQ?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=404 alt=image src="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOwtrfswXPuGWxAD5a3Bu-Ix9sTWrex_myzKDeYV6TXLHt_-h9UVIA33IcaBrkW61-ZYmOYwQkmnpA?PARTNER=WRITER" width=604 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Finally, I decided to use Color By Value on the &lt;em&gt;Parent Element&lt;/em&gt; property rather than on the &lt;em&gt;Outline Level&lt;/em&gt; one ... just to make the diagram more interesting. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjay3tcC1VQ84nAzda4zODtxhhq4s6ZQftVihZy2zXK0bwtRtIH5DhrtVJ3bQxFystlCG1B7iSeOWXOMvrsugpw0?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=429 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2C_DsRkfpgr6KR1wObKlhmseo5UHcaoGwZ4J6iRj87RS8K7NLck-yFM7YdIE60Bp97e2JhZW0sqSg2vJsUin_8?PARTNER=WRITER" width=600 border=0&gt;&lt;/a&gt; 
&lt;p&gt;When all of this is applied, then you will hopefully see how much more understandable the data is when Link Data to Shapes and Data Graphics are combined in Visio 2007 Professional. 
&lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh0pheCoH50p4f1gHbeR-AWM5VerZcO6c5uKjdQxzkunsG8c8l06HT9C0y33mLKG99_qkieq81baC3_c2gzJYIq_?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=575 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2i47iK2wyxBzSArmoWSL0yb0RbkHLLBmucbVNeTpw-1JDLEzt5iCYnuXaU8PijNY0__06j4aH17a5dXmHLolRQ?PARTNER=WRITER" width=596 border=0&gt;&lt;/a&gt; 
&lt;p&gt;So,the overall effect is a linked WBS Modeler diagram that can be refreshed whenever the data is published into the Excel workbook from Project. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZ4_gv1aFek3U1ZSBQEzh9HV8p7AlL1EAcAEr7jtUiD3j2jSC6GS-XWdTjCKRee4ksldaF-gi_vkBafwLeq1SCD?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=413 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh3ypZilQvGXcI759owyLaEquf1sXAt0xxSZFIJPIhUBq3wnX8jb2j_-8HqEjHUwpSc6rS3dwkItVqoJKPeRBP6g?PARTNER=WRITER" width=596 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Of course, any Visio diagram that utilises Data Graphics is much enhanced by a legends for the linked recordsets, Color By Value and Icon Sets.  However, this is not available out-of-the-box, so you will have to trial (then hopefully buy) my own DataLegends add-in (&lt;a title="http://www.bvisual.net/Products/DataLegends.aspx" href="http://www.bvisual.net/Products/DataLegends.aspx"&gt;http://www.bvisual.net/Products/DataLegends.aspx&lt;/a&gt;) 
&lt;p&gt;The files above are available for download at &lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/CommercialConstruction.zip" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/CommercialConstruction.zip"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/CommercialConstruction.zip&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Linking+Visio+WBS+Modeler+Diagrams+to+Project&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!404.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!404.entry</guid><pubDate>Thu, 24 Apr 2008 11:34:02 GMT</pubDate><slash:comments>5</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!404/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!404.entry#comment</wfw:comment><dcterms:modified>2008-06-17T13:57:46Z</dcterms:modified></item><item><title>Wanna See Some Visio MVPs?</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!363.entry</link><description>&lt;p&gt;Last week, Microsoft invited all worldwide MVPs to the annual MVP shindig in Seattle.  So, I thought it may be interesting for some to see what a Visio MVP looks like! &lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOxvo-6YHeKx012gIDRQJ9CTXlHuK_XTDX1-xy3DLXApFFgCZp-Nu66NK0O6ECNibQ9Aqdk-YZ3x1A?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=242 alt=3Amigos2 src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbVnbsG4xPlZ1UTzoTVVriHRAOPYz0LCFBpSHsxnJ5sKz6hwN9bXpKpc4Tlg4ytbAOSitj-_jGxP-NaWeglQx6b?PARTNER=WRITER" width=605 border=0&gt;&lt;/a&gt;  &lt;p&gt;Left to right - me (MVP UK), Senaj Lelic (MVP Germany) and John Marshall (MVP Canada) - the oldest and longest serving Visio MVP! &lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjahQlQuGewAPDtE8YTpthwy59vhoyPfAXPy7-Vrpin4do-dsJIS4x2jz2yt_AA8cm6370I_hj4Z-CPxqOxxCj9i?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=240 alt=2Amigos src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjYYfKJrNSNxsYKdbaUIr7f_OFdl5MTNB6xUPjxodx3Ugw-9d8poT4rn0YraXH1hAeIhja29ZDmiBtuz5ylIAX3H?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt;  &lt;p&gt;David Salaguinto (Microsoft), Dave Edson (MVP USA - currently), Tim Davenport (Microsoft), Graham Wideman (MVP USA/Canada), and Dan Albertson (Microsoft). &lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjYEgWxkBfoErULINPUaJat6Tx_lgPyG1nF0mLY7A9XCDub1MTca9NfSYnX6glsFtAtUQdHUnggLiHjhJNZoQBxm?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=262 alt=3Amigos src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjY_Ro5loOPv_SGRNcLt1pihkwSak7tBOO7U-W1CDdeG9ezIaoyfL6gXbFJEPeOm9laPYEcswA0QJc7g55SamyvT?PARTNER=WRITER" width=603 border=0&gt;&lt;/a&gt;  &lt;p&gt;Senaj Lelic (again), Al Edlund (MVP USA) and Chris Roth (MVP USA/Austria/Germany/...) &lt;p&gt;We would like to thank Microsoft Visio product team for two very enjoyable days on campus (trying to beat the Outlook guys to the food), and I'm sure they really do appreciate our feedback!&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Wanna+See+Some+Visio+MVPs%3f&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!363.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!363.entry</guid><pubDate>Mon, 21 Apr 2008 21:01:22 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!363/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!363.entry#comment</wfw:comment><dcterms:modified>2008-04-21T21:05:49Z</dcterms:modified></item><item><title>Setting Visio Shape Cell Values By Connections</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!347.entry</link><description>&lt;p&gt;A recent newsgroup poster asked me to explain how to set the line color and weight of a connector according to the shapes it is connected to.  So, in this article, I have tried to explain one method of achieving this with minimal external coding. 
&lt;p&gt;In this example, I have created a rectangle shape that has a single Shape Data row, MyData, which has a fixed list of values, A;B;C. 
&lt;p&gt;The connector shape has been modified to trigger an event whenever a connection is made or unmade.  If the user successfully connects two rectangles with the same MyData value, then the line (weight and color) of the connector shape is amended to match the rectangle shapes. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOx0VkU4JkGgUv9DIarjm2JkSTipQlvvnR66lJAGUrc59GJlGXkFBFq_spvbNBZsqJ9674AfL4IDDA?PARTNER=WRITER"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height=193 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjYBfghPHA9TSuMyEknyziVRMpZilh2w1yGcUkaDms_YXI3ZVNsrdytoStLF8aQBe_QQDbNSciVmw73BlyuiRj45?PARTNER=WRITER" width=610 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The diagram below attempts to explain the relationships between the cells in the rectangle, connector and page. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOy052dbTkHMARRgu2pZGUFDESzv_7dVwIgf-qlXtxWIeV_oAN0amSH3os7xPIlg4aWysfpc25S9uQ?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=268 alt=image src="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOwevH2G2Sfswtk2kQKwsrPhbhFmdXl0RuusVuvKdKwhguKTcZ30aqPUItqVxzelaoLEMIQY4Fb2Zg?PARTNER=WRITER" width=608 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The red arrows indicate the values updated by the VBA code; the green arrows indicate the values referenced from the page shapesheet, and the blue arrows indicate the values referenced within the same shapesheet. 
&lt;p&gt;
&lt;h2&gt;Page&lt;/h2&gt;
&lt;p&gt;I modified the page shapesheet to have three new User-defined rows in order to have a centralised list of possible data values, and the corresponding line weights and colors for each value.  This is done with a simple semi-colon separated list, which could have been updated from an external data source. 
&lt;p&gt;&lt;em&gt;User.MyDataList&lt;/em&gt;=&amp;quot;A;B;C&amp;quot; 
&lt;p&gt;&lt;em&gt;User.MyLineWeights&lt;/em&gt;=&amp;quot;1pt;2pt;3pt&amp;quot; 
&lt;p&gt;&lt;em&gt;User.MyLineColors&lt;/em&gt;=&amp;quot;RGB(255,0,0);RGB(0,255,0);RGB(0,0,255)&amp;quot; 
&lt;p&gt;In fact, these page cells could be inserted into the Master page of both the Rectangle and Connector shape (as in the sample diagram available below) and the act of dropping either master onto a new page will have the effect of duplicating these cells in the page shapesheet. 
&lt;h2&gt;Rectangle&lt;/h2&gt;
&lt;p&gt;Then I modified a rectangle to have a new Shape Data row (Prop.MyData), where the format cell referenced the page User.MyDataList cell. 
&lt;p&gt;&lt;em&gt;Prop.MyData.Format&lt;/em&gt;=ThePage!User.MyDataList 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etja4uvftBYiN9kfFX_C0cOXuzXiJ_nVP7QkMzDVUo7-N6TZfl-Qbsg54xeWRJd4oLKMXEsYb4zsivYsGuojm9r1-?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=41 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbI_vZ8LNgdgnCObf9Dps5k0IbW4mIU2BY4MkhOd6gTGYxblKuA6jpU-qOOpjm906BeiuuO3CCgh1oHIIN4slst?PARTNER=WRITER" width=602 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The line weight and color of the rectangle is changed with the following formulae: 
&lt;p&gt;&lt;em&gt;LineWeight&lt;/em&gt;=GUARD(INDEX(LOOKUP(Prop.MyData,Prop.MyData.Format),ThePage!User.MyLineWeights)) 
&lt;p&gt;&lt;em&gt;LineColor&lt;/em&gt;=GUARD(INDEX(LOOKUP(Prop.MyData,Prop.MyData.Format),ThePage!User.MyLineColors)) 
&lt;h2&gt;Dynamic Connector&lt;/h2&gt;
&lt;p&gt;Now, in order to get the connector shape to fire an event whenever the connector shape is connected or disconnected, it is necessary to call a bit of code, ConnectIT, whenever the value in the BegTrigger or EndTrigger changes.  These cells are automatically updated whenever a connect or disconnect is done. 
&lt;p&gt;&lt;em&gt;User.ConnectITTrigger&lt;/em&gt;=DEPENDSON(BegTrigger,EndTrigger)+CALLTHIS(&amp;quot;ConnectIT&amp;quot;,&amp;quot;&amp;quot;) 
&lt;p&gt;&lt;em&gt;User.BegIdx&lt;/em&gt;=0 
&lt;p&gt;&lt;em&gt;User.EndIdx&lt;/em&gt;=0 
&lt;p&gt;I amended the LineWeight and LineColor formulae to respond to values in the User.BegIdx and User.EndIdx cells. 
&lt;p&gt;&lt;em&gt;LineWeight&lt;/em&gt;=THEMEGUARD(&lt;strong&gt;IF(AND(User.BegIdx=User.EndIdx,User.BegIdx&amp;gt;0,ISERRVALUE(BeginX)=FALSE,ISERRVALUE(EndX)=FALSE),INDEX(User.BegIdx,ThePage!User.MyLineWeights),&lt;/strong&gt;IF(CELLISTHEMED(FALSE),THEME(&amp;quot;ConnectorWeight&amp;quot;),SETATREFEXPR(THEME(&amp;quot;ConnectorWeight&amp;quot;))))&lt;strong&gt;)&lt;/strong&gt; 
&lt;p&gt;&lt;em&gt;LineColor&lt;/em&gt;=THEMEGUARD(&lt;strong&gt;IF(AND(User.BegIdx=User.EndIdx,User.BegIdx&amp;gt;0,ISERRVALUE(BeginX)=FALSE,ISERRVALUE(EndX)=FALSE),INDEX(User.BegIdx,ThePage!User.MyLineColors),&lt;/strong&gt;IF(CELLISTHEMED(FALSE),SETATREFEXPR(THEME(&amp;quot;ConnectorColor&amp;quot;)),SETATREFEXPR(0)))) 
&lt;p&gt;The bold characters are those bits that I added into the existing LineWeight and LineColor formulae, in order to check that the index of the values of the rectangle shapes at either end match each other.  If they do, then the line is changed too. 
&lt;p&gt;The ISERRVALUE(BeginX)=FALSE and ISERRVALUE(EndX)=FALSE part trap the changes due to either rectangle from being deleted. 
&lt;h2&gt;VBA Code&lt;/h2&gt;
&lt;p&gt;Whenever the code is called, it clears the values in the User.BegIdx and User.EndIdx cells, then sets a formula to return the index of the value in the connected rectangle shapes, if they exist. 
&lt;p&gt;The following subroutine was added to a new module in the VBA project of the document: 
&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;Public Sub&lt;/font&gt; ConnectIT(&lt;font color="#0000ff"&gt;ByVal&lt;/font&gt; shp &lt;font color="#0000ff"&gt;As&lt;/font&gt; Visio.Shape)&lt;/font&gt; 
&lt;blockquote&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;If &lt;/font&gt;Visio.Application.IsUndoingOrRedoing &lt;font color="#0000ff"&gt;Then&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;Exit Sub&lt;/font&gt;&lt;br&gt;&lt;font color="#0000ff"&gt;End If&lt;/font&gt;&lt;br&gt;&lt;font color="#0000ff"&gt;Dim&lt;/font&gt; cnx &lt;font color="#0000ff"&gt;As&lt;/font&gt; Visio.Connect&lt;br&gt;shp.Cells(&amp;quot;User.BegIdx&amp;quot;).Formula = &amp;quot;0&amp;quot;&lt;br&gt;shp.Cells(&amp;quot;User.EndIdx&amp;quot;).Formula = &amp;quot;0&amp;quot;&lt;br&gt;&lt;font color="#0000ff"&gt;For Each&lt;/font&gt; cnx &lt;font color="#0000ff"&gt;In&lt;/font&gt; shp.Connects&lt;br&gt;    If cnx.ToSheet.CellExists(&amp;quot;Prop.MyData&amp;quot;, Visio.visExistsAnywhere) &lt;font color="#0000ff"&gt;Then&lt;/font&gt;&lt;br&gt;        &lt;font color="#0000ff"&gt;If&lt;/font&gt; cnx.FromCell.Name = &amp;quot;BeginX&amp;quot; &lt;font color="#0000ff"&gt;Then&lt;/font&gt;&lt;br&gt;            shp.Cells(&amp;quot;User.BegIdx&amp;quot;).Formula = _&lt;br&gt;                &amp;quot;=LOOKUP(Sheet.&amp;quot; &amp;amp; cnx.ToSheet.ID &amp;amp; _&lt;br&gt;                &amp;quot;!Prop.MyData,ThePage!User.MyDataList)&amp;quot;&lt;br&gt;        &lt;font color="#0000ff"&gt;ElseIf&lt;/font&gt; cnx.FromCell.Name = &amp;quot;EndX&amp;quot; &lt;font color="#0000ff"&gt;Then&lt;/font&gt;&lt;br&gt;            shp.Cells(&amp;quot;User.EndIdx&amp;quot;).Formula = _&lt;br&gt;                &amp;quot;=LOOKUP(Sheet.&amp;quot; &amp;amp; cnx.ToSheet.ID &amp;amp; _&lt;br&gt;                &amp;quot;!Prop.MyData,ThePage!User.MyDataList)&amp;quot;&lt;br&gt;        &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;End If&lt;br&gt;&lt;/font&gt;    &lt;font color="#0000ff"&gt;End If&lt;/font&gt;&lt;br&gt;&lt;font color="#0000ff"&gt;Next&lt;/font&gt;&lt;/font&gt;&lt;/blockquote&gt;
&lt;p align=left&gt;&lt;font face="Courier New" color="#0000ff"&gt;End Sub&lt;/font&gt; 
&lt;p&gt;Consequently, the connector shape responds to connections, disconnections and data changes in the connected rectangle shapes. 
&lt;p&gt;You can download the sample drawing here: &lt;a href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ConnectTrigger.vsd"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ConnectTrigger.vsd&lt;/a&gt; or &lt;a href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ConnectTrigger.zip"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ConnectTrigger.zip&lt;/a&gt;&lt;a href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ConnectTrigger.vsd"&gt;&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Setting+Visio+Shape+Cell+Values+By+Connections&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!347.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!347.entry</guid><pubDate>Sun, 20 Apr 2008 21:30:36 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!347/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!347.entry#comment</wfw:comment><dcterms:modified>2008-06-17T13:58:35Z</dcterms:modified></item><item><title>UK User Groups IT Pro Community Event</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!338.entry</link><description>&lt;p&gt;In my quest to promote Visio 2007 Professional as the visual information system of choice, I am presenting at the IT Pro Community event for the next two days, so I have posted my slides here. (Day 1 has little code, but Day 2 has lots of VBA code examples.): &lt;p&gt;&lt;a title="http://www.ukusergroups.co.uk/index.html" href="http://www.ukusergroups.co.uk/index.html"&gt;http://www.ukusergroups.co.uk/index.html&lt;/a&gt; &lt;p&gt;&lt;strong&gt;Day 1 - Visualizing Information with Microsoft Visio 2007&lt;/strong&gt; slides: &lt;p&gt;&lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/Visio%202007%20visualising%20data.pptx" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/Visio 2007 visualising data.pptx"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/Visio%202007%20visualising%20data.pptx&lt;/a&gt; &lt;p&gt;Visio is a unique data visualization application, and the 2007 edition adds three new important data features that provide brand new data links, data graphics and pivot diagrams. These capabilities, along with the existing and often under-exploited tools, firmly position Visio as the foremost practical, easy to use visual information system that can be applied to a multitude of business scenarios. Microsoft Visio has been able to link ODBC data sources for many years via the Database Wizard, but this has limitations such as only a single data link per shape, and no support for stored procedures. Microsoft Visio 2007 overcomes both of these with the new Link Data programmable API, making it simple for end users and developers to create data rich diagrams that can be refreshed simply. In addition, the new Data Graphic features enable you to enhance linked shapes with icons, data bars, text callouts and color by value. The new Pivot Diagrams can be linked to data sources, including SQL Server Analysis Services, to provide interactive drill-downs of data diagrams, allowing the user to visualise, analyse, and present aggregate information in a new appealing manner. I'll demonstrate the new features...and show how these data links can be made. &lt;p&gt;  &lt;p&gt;&lt;strong&gt;Day 2 - Visualizing Information the Smart (Diagram) Way&lt;/strong&gt; slides: &lt;p&gt;&lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/Visualising%20info%20the%20smart%20diagram%20way.pptx" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/Visualising info the smart diagram way.pptx"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/Visualising%20info%20the%20smart%20diagram%20way.pptx&lt;/a&gt; &lt;p&gt;Visio is a smart drawing tool, but it is even smarter when linked to corporate data, systems or processes, enabling it to be automatically refreshed to visualize the latest facts and figures. Data-linked Visio diagrams can be used for visualization of complex information; analysis of statistics; and communication to a broader audience with the Visio Viewer or as web pages.&lt;br&gt;This session will demonstrate linking Visio shapes to data from a variety of sources, including SQL Server stored procedures and XML files; how to drill-down into information using PivotDiagrams; and how to display data values with Data Graphics (and how to create your own). It will also include methods to automatically connect shapes together from data to create an Organization Chart without the Org Chart Wizard; and how to create legends for data graphic items. &lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+UK+User+Groups+IT+Pro+Community+Event&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!338.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!338.entry</guid><pubDate>Tue, 08 Apr 2008 06:38:39 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!338/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!338.entry#comment</wfw:comment><dcterms:modified>2008-04-08T06:38:39Z</dcterms:modified></item><item><title>UK Counties and Boroughs Map Shapes for Visio</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!330.entry</link><description>&lt;p&gt;My friend and colleague, Chris Roth, has made lots of maps available in Visio, his latest being Germany ( &lt;a title="http://www.visguy.com/2008/03/01/map-of-germany/" href="http://www.visguy.com/2008/03/01/map-of-germany/"&gt;http://www.visguy.com/2008/03/01/map-of-germany/&lt;/a&gt; ).  Well, we Brits hate being outdone by a German-American, so I have decided to make my UK Map shapes for Visio publicly available at  &lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/UK%20Geography%20Structure.vsd" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/UK Geography Structure.vsd"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/UK%20Geography%20Structure.vsd&lt;/a&gt; . 
&lt;p&gt;I created the UK map several years ago by converting from PDF to SVG to Visio, and each of the counties and boroughs have a single rectangular Master, Admin Area.  I used code to replace the rectangle geometry with the actual shape geometry.  This means that, although they are all different, they actually have the same Master, thus making it easier to propagate any changes, such as Shape Data rows. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaJqHumVPwHLkEIzheR8oqsgNmw5-w9BEPO7scGXwgesDKscfAxMkBMC8NPbkGd95_2WI9UIGyDwXlB2kbS-P-7?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=454 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaFgKo3zDUj2kP2BRG82HyXxbdtALkiqNHR953JhzbY2yak9GmKFwPGoKwJ09XnBqU-5aZ8Sq7A8ngpsHj7inyy?PARTNER=WRITER" width=609 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The download is a multi-page document of over 3mb, so be warned, and it also includes a chart of the breakdown of the UK Administrative Areas. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjb_Q_av3M2HEs3-6YpmUI673id0VWFvZde_u8tPgN6DRywF0IJnMAeldUPV5x2zFleRjGsPaFs21SuXNRkohHcc?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=430 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjYPP2LMg-zhGPcvkxidqg34zpV5sNyR0bAlkcDoen5LQCS8asb3spvX-WnVnQ0wmydEFMYGoeKJgXU80vWbOlqz?PARTNER=WRITER" width=610 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The Admin Area (and County) shapes are linked to the Excel spreadsheet (&lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/UK%20Counties%20and%20Unitary%20Authorities.xlsx" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/UK Counties and Unitary Authorities.xlsx"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/UK%20Counties%20and%20Unitary%20Authorities.xlsx&lt;/a&gt;), UK Counties and Unitary Authorities.xlsx, which contains columns of data about each area, and provides an hyperlink  Notice the formula to concatenate two strings): 
&lt;p&gt;=HYPERLINK(&amp;quot;&lt;a href="http://en.wikipedia.org/wiki/&amp;quot;"&gt;http://en.wikipedia.org/wiki/&amp;quot;&lt;/a&gt; &amp;amp; SUBSTITUTE(C2,&amp;quot; &amp;quot;,&amp;quot;_&amp;quot;)) 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjasHK1qv-9efQBuPO1C2NHU4tbrBa9g0t7Ndc2F5i9WpkE-h9RNuYZoCUzlH3SniS3xN6YLwYAiaRsyjsfHBk9X?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=137 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaXrsuogusn2U6t4QaEcESwc4jnhNt0TZwLg4_kR2Gj63fxBFU2St7xVVQ8n_xfcknm_0yZKts0Td5OdcXdug8d?PARTNER=WRITER" width=607 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I found out that the Visio 2007 Professional LinkData to Shapes function automatically  thinks that values with &amp;quot;xxx:&amp;quot; at the start are hyperlinks, so I had to uncheck the Hyperlink setting for the Information column.  (Interestingly, &amp;quot;Code:xxxx&amp;quot; opens op Lutz Roeder's Reflector app on my PC!) 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaUJE-i_5FCfXQvo8yZg2cSAfFSoQkIYeIl--prhjx0msAtCBvPEM2qY8-gKX15aoVQ86qD_fk3YEIRTfsz-dt_?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=378 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZRdiVDJa2ojBX4CTgsVkJkB2TvOhJtVPdJI4jMut_ghCb02MxbJj2BWpb0-zJiGkeBzKDvEkgI5M2JR3XGT-U3?PARTNER=WRITER" width=610 border=0&gt;&lt;/a&gt; 
&lt;p&gt;After making this change, I was able to Automatically Link the data to the shapes where Name = Name, and end up with a hyperlink that points to the Wikipedia for the region. 
&lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh0dDtxwQgBBlDpImUhluboE1cHF4ETgwdLvH8o6yYy-yaplXWPq9EP9Vtgz7W-CSkrsoMlnwj7CJ9nSL0M_wXWw?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=272 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh10xrowS7398CeZDFiWEpZK6Hlx1tNTQcokLKO5Nxb5XoefZaucXwXwWZR7gCA_sY8_4UryItPZyuQicVfO167p?PARTNER=WRITER" width=309 border=0&gt;&lt;/a&gt;  
&lt;p&gt;NB.  I was going to use the Visio 2007 Professional Color By Value to automatically fill the regions, but I discovered that there is currently a 100 discrete value limit...so, I have used the Space Plan Color By Value legends - that does not have the limit!  Maybe next version... 
&lt;p&gt;Enjoy!&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+UK+Counties+and+Boroughs+Map+Shapes+for+Visio&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!330.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!330.entry</guid><pubDate>Fri, 04 Apr 2008 10:26:06 GMT</pubDate><slash:comments>1</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!330/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!330.entry#comment</wfw:comment><dcterms:modified>2008-06-17T14:00:29Z</dcterms:modified></item><item><title>Using Fill Patterns with DataGraphic Color By Value</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!313.entry</link><description>&lt;p&gt;Microsoft Office Visio 2007 Professional provides the ability to color shapes by different values in selected cells.  This is great, but just how many color variations can your eyes detect?  If you have lots of different values, then the color by value automatically produced colors can look too similar to be able to distinguish them apart. In this article, I propose a method of automatically assigning different fill patterns to similar colors so that they can be visually separated. 
&lt;p&gt;First, we must try to understand how the color by value works. In the following example based on a large number of uniquely named departments, I wish to be able to distinguish the spaces assigned to each one on a floor plan.  I have just shown the color assignments for the first 20 departments (automatically sorted alphabetically) created with a Color By Value Data Graphic item for the Department shape data values. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn5kvKBo4Xw3JQhSK3YeZA3EJfSeMWnFsW6KfzttBqqxQNb6stA0v1zuHKtdkuB80WY?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=111 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn4AHf6rT210ziCpBNPjvnPzt-WZAAuSAwDqcLJFZUIHcrr4dZ4wIE3GfhY1NYEstQ8?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt; &lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn6LTN5-pUuKa6hGNWV8E-6DwRbS7XWgf2YYjeotStvc62onUzhWRSCD2RYkvn0IMR4?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=111 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn5Qz58WbwhyehCMJZhzqgBgP8fPGzopCgHc4MuiNySI4GYnNew8CsY5TQbvxc2p9hI?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt; 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn6x_mXm4bEIwoEkKud1M3arP8ABHaZZ3ExChK_Cp_nF775hQh1H6LLZaoVpQLYbvuI?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=111 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn5g9s-9AW7u2VCFrQI2vgT55j8sazArCdHtMSK5QWy5GVnVnJh_OYDd-oktbCuFlJs?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt; &lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn4jyqqe-33xgj5PZLii2Vi4VYjexzocyj9htC0obLpf5xQDviGN1oCejwxV05jnPus?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=111 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn7IyoA5mILB77SG8x_b3RqxY3ExBK-m1al5IL6gqMg_vYIYDhk-cU3yA6iFOKWgZoQ?PARTNER=WRITER" width=244 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Notice how the color assignments have started again from the Red for Dept 23?  So, we have reached the limit of automatically assigned colors.  Of course, we could decide to blend our own colors using the color picker, and there are a possible 16,777,216 different color combinations using the RGB or HSL notation, but just how many variations can the human eye perceive? 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn52o4hDySwyeSkISSV8kHs02h1ZPQUwccQMWEUPZxS5RT5osA8BqnSRxIomufvLC6M?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=244 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn4y0zQEtnLAr9W6AyX4C7vxCCsOUXGSV96Y4TBS_pJwAcKGE-pRgi9pRw9_YWQI2OM?PARTNER=WRITER" width=229 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Now, the Data Graphic Color By Value formulae are added to an automatically created User.visDGCBVFill cell in the ShapeSheet of the Data Graphic master, and, therefore to all shapes that use it. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOxQbFRXGRArevbplvikjm-jKxE2SOxuG3cmfai58gWPV9QVXg7JUra_k03qOw-KkOAoFne8oKg1hw?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=69 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etja2swIRZfOCXkeSdMcd1t-3eOfMEky8K6e9iuPdbPlhxdQsPtanCNTkCq0DYq-2tRbRr5uJp7r8sVzbbXMFocef?PARTNER=WRITER" width=606 border=0&gt;&lt;/a&gt; 
&lt;p&gt;In fact, if the shape is a group, then an almost identical formula is added to the sub shapes too, except that they refer to the cell value in the group shape.  Thus Prop.Department would become Sheet.5!Prop.Department (or whatever the sheet ID is). 
&lt;p&gt;N.B.  If you intend to use Data Graphics with instances of a Master, then it is probably worthwhile making it into a group at the start, since any other Data Graphic items (Text Callouts, Data Bars and Icon Sets) will automatically convert the instances into groups.  
&lt;p&gt;The color of the background fill (FillBkgnd) is read from the result of User.visDGCBVFill and the foreground fill (FillForegnd) is a TINT of the back ground fill. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbr9dtO4W5V4bQXldg6YLKGDoK1hPEmgER2SzcsXl9e3wn5IKk5M9o6GaCo8uhOZg1_1EqDCZ_NX3_6sEyi-ENH?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=79 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbEVXoAfULvQg64LQnDPtwJbFJVdT6jYHPRWvYz4xLPermHgkq-67SFz0i7Yp8tbSlbbFNHTn4Ka94T_w8Vo4F7?PARTNER=WRITER" width=602 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I should explain (or remind you if you knew this already) that the foreground and background fill colors are only both used  when the fill pattern is not 1 (Solid).  In fact, the presentation of foreground and background is reversed in the user interface when a fill pattern is not Solid. 
&lt;p&gt;This is the standard fill patterns, starting with no fill, then white (RGB(255,255,255)) solid fill foreground then applying each standard fill pattern with a blue (RGB(31, 71, 125)) pattern color.  Notice how the FillForegnd and FillBkgnd cell values switch above a FillPattern of 1. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZknA4WyX1GKeR3dCk1Q34_kponx3SDk1nHFY8O-hyjnZ0SlNllFYnyuWiJTkT2U8FvFaSqWXRZoaqP8A03RTv5?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=402 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2pa7c3iWZnEdwzEHyaeCshOz3iYFX0cRi-2kt79nxFG6H2sVj2XI9Z58MEETB0QBP64xEqwlu8jjg1yjEtgWCU?PARTNER=WRITER" width=600 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Now, the Data Graphic Color By Value uses Solid colors, therefore it is necessary to look at the reverse of the above to get a better idea of how these fill patterns would appear in a shape. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbGwQpUnosriQLO5FO1NvDRvSMQ6XRMIdRi7qIJPWOTux_UqDNx1LBiKxnBUWE-BFcY1Sc-KntIkYZH4Uog4muu?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=403 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh3jV_BxyaGdlAU9pMzCqghzE9uAQkBPoN117Eok6UQTTRpE1ZItSQtJo1GPeMAYnIz_V2oh7AZGH_e_1ML_MITu?PARTNER=WRITER" width=599 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Now, not all shapes will be rectangular in appearance, so some patterns work better than others. 
&lt;p&gt;So, here are 40 different departments using the default color by value colors... 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbqf_4asPFvvlJXYhEG0FISJ6BFeF0NIpAmXIUVFMJG0KYQjCl58C0GFD3GbqjzYVCpXSDcajeBDc36HO1chu_O?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=310 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh0iw3IQ45aaCU7dqODTzZ186R-bu53X_5Nj_WZtp5oLcv8EHmy3hG49K_aBID14JU6ap5jJQRJtIYUei02dOcsc?PARTNER=WRITER" width=599 border=0&gt;&lt;/a&gt; 
&lt;p&gt;As you can see, it is a little difficult to distinguish some of the colors because they are exactly the same! 
&lt;p&gt;In the screenshot below, I have applied a VBA function, UpdateCBVFillPatterns, which has additionally cycled through a list of fill pattern numbers (in this case &amp;quot;13;14;15;16;17;18&amp;quot; ).  
&lt;p&gt;You can now visually distinguish different departments! 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjbaJXmQfo3E9D6F2ejPICdIJRDreP_nAq-cIktsxRAc7Gp_oVKTWX9KMhjrtDsxc8K2mdyKFCuxjH1vepR4xaon?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=310 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjaEpZz92fPh8PxO-4sjyFXbH_v7UBckTJSMa5NCwUrHPMpVarEbN0ybK0lwMudINu1WncFYRPGwPJpn9QnV_Hpk?PARTNER=WRITER" width=601 border=0&gt;&lt;/a&gt; 
&lt;p&gt;I have included the whole VBA code below for you to try.  Please note that this currently expects you to select one shape that uses Color By Value before running the it, and it only updates the active page, but it could be extended to update the whole document quite easily. 
&lt;p&gt;In addition, I am looking into extending the legends created by our own DataLegends product (&lt;a href="http://www.bvisual.net/Products/DataLegends.aspx" target="_blank"&gt;http://www.bvisual.net/Products/DataLegends.aspx&lt;/a&gt; ) to also show the fill patterns.  
&lt;p&gt;Public Sub UpdateCBVFillPatterns()&lt;br&gt;Dim shp As Visio.Shape&lt;br&gt;    If Visio.ActiveWindow.Selection.Count = 0 Then&lt;br&gt;        MsgBox &amp;quot;There is no shape selected!&amp;quot;&lt;br&gt;        Exit Sub&lt;br&gt;    Else&lt;br&gt;        Set shp = Visio.ActiveWindow.Selection.PrimaryItem&lt;br&gt;    End If&lt;br&gt;Dim mstDG As Visio.Master&lt;br&gt;    If shp.DataGraphic Is Nothing Then&lt;br&gt;        MsgBox &amp;quot;The selected shape does not have a data graphic!&amp;quot;&lt;br&gt;        Exit Sub&lt;br&gt;    Else&lt;br&gt;        Set mstDG = shp.DataGraphic&lt;br&gt;    End If&lt;br&gt;Dim gi As Visio.GraphicItem&lt;br&gt;    For Each gi In mstDG.GraphicItems&lt;br&gt;        If gi.Type = visTypeColorByValue Then&lt;br&gt;            Exit For&lt;br&gt;        End If&lt;br&gt;    Next gi&lt;br&gt;    If gi.Type &amp;lt;&amp;gt; visTypeColorByValue Then&lt;br&gt;        MsgBox &amp;quot;The selected shape does not have a Color by Value graphic item!&amp;quot;&lt;br&gt;        Exit Sub&lt;br&gt;    End If&lt;br&gt;'Enter the list of standard patterns to use&lt;br&gt;Dim patternList As String&lt;br&gt;    patternList = &amp;quot;13;14;15;16;17;18&amp;quot; 
&lt;p&gt;Dim bkgndColor As String&lt;br&gt;    bkgndColor = &amp;quot;RGB(255,255,255)&amp;quot;&lt;br&gt;Dim mst As Visio.Master&lt;br&gt;Dim shpMst As Visio.Shape 
&lt;p&gt;&lt;br&gt;'The Shape could have a master, so best to update it&lt;br&gt;If Not shp.Master Is Nothing Then&lt;br&gt;    Set mst = shp.Master.Open&lt;br&gt;    addTriggerCell mst.Shapes(1), patternList, bkgndColor&lt;br&gt;    'Could be applied to a sub-shape&lt;br&gt;    For Each shpMst In mst.Shapes(1).Shapes&lt;br&gt;        addTriggerCell shpMst, patternList, bkgndColor&lt;br&gt;    Next&lt;br&gt;    mst.Close&lt;br&gt;End If 
&lt;p&gt;Dim sel As Visio.Selection&lt;br&gt;Dim shpSel As Visio.Shape&lt;br&gt;Dim shpSub As Visio.Shape&lt;br&gt;    'Select all of the shapes in the active page that use this Data Graphic&lt;br&gt;    Set sel = Visio.ActivePage.CreateSelection(visSelTypeByDataGraphic, 0, mstDG)&lt;br&gt;    For Each shpSel In sel&lt;br&gt;        addTriggerCell shpSel, patternList, bkgndColor&lt;br&gt;        'Could be applied to a sub-shape&lt;br&gt;        For Each shpSub In shpSel.Shapes&lt;br&gt;            addTriggerCell shpSub, patternList, bkgndColor&lt;br&gt;        Next&lt;br&gt;    Next&lt;br&gt;End Sub 
&lt;p&gt;Private Sub addTriggerCell(ByVal shp As Visio.Shape, _&lt;br&gt;    ByVal patternList As String, ByVal bkgndColor As String)&lt;br&gt;    'Check that visDGCBVFill cell exists&lt;br&gt;    If shp.CellExists(&amp;quot;User.visDGCBVFill&amp;quot;, Visio.VisExistsFlags.visExistsLocally) = 0 Then&lt;br&gt;        Exit Sub&lt;br&gt;    End If&lt;br&gt;'Get the color formula&lt;br&gt;Dim clrFormula As String&lt;br&gt;    clrFormula = shp.Cells(&amp;quot;User.visDGCBVFill&amp;quot;).FormulaU 
&lt;p&gt;'Collect the matching values in order&lt;br&gt;Dim aryFormula() As String&lt;br&gt;    aryFormula = Split(clrFormula, &amp;quot;STRSAME(&amp;quot;) 
&lt;p&gt;If UBound(aryFormula) &amp;lt; 1 Then&lt;br&gt;    Exit Sub&lt;br&gt;End If 
&lt;p&gt;&lt;br&gt;Dim ipart As Integer&lt;br&gt;Dim aryValues() As String&lt;br&gt;    For ipart = 1 To UBound(aryFormula)&lt;br&gt;        ReDim Preserve aryValues(ipart - 1)&lt;br&gt;        aryValues(ipart - 1) = Split(aryFormula(ipart), &amp;quot;,&amp;quot;)(0)&lt;br&gt;    Next ipart 
&lt;p&gt;'Get the cell reference&lt;br&gt;Dim cellRef As String&lt;br&gt;    cellRef = Split(aryFormula(1), &amp;quot;,&amp;quot;)(1)&lt;br&gt;'Create the index of the value from the lookup list&lt;br&gt;Dim idxPart As String&lt;br&gt;    idxPart = &amp;quot;LOOKUP(&amp;quot; &amp;amp; cellRef &amp;amp; &amp;quot;,&amp;quot;&amp;quot;&amp;quot; &amp;amp; Replace(Join(aryValues, &amp;quot;;&amp;quot;), &amp;quot;&amp;quot;&amp;quot;&amp;quot;, &amp;quot;&amp;quot;) &amp;amp; &amp;quot;&amp;quot;&amp;quot;)&amp;quot;&lt;br&gt;Dim aryPatterns() As String&lt;br&gt;    aryPatterns() = Split(patternList, &amp;quot;;&amp;quot;)&lt;br&gt;'Build the trigger formula&lt;br&gt;Dim tFormula As String&lt;br&gt;    tFormula = &amp;quot;DEPENDSON(User.visDGCBVFill)&amp;quot;&lt;br&gt;    tFormula = tFormula &amp;amp; &amp;quot;+SETF(GetRef(FillPattern),INDEX(MODULUS(&amp;quot;&lt;br&gt;    tFormula = tFormula &amp;amp; idxPart &amp;amp; &amp;quot;,&amp;quot; &amp;amp; CStr(UBound(aryPatterns) + 1)&lt;br&gt;    tFormula = tFormula &amp;amp; &amp;quot;),&amp;quot;&amp;quot;&amp;quot; &amp;amp; patternList &amp;amp; &amp;quot;&amp;quot;&amp;quot;))&amp;quot;&lt;br&gt;    tFormula = tFormula &amp;amp; &amp;quot;+IF(INDEX(MODULUS(&amp;quot;&lt;br&gt;    tFormula = tFormula &amp;amp; idxPart &amp;amp; &amp;quot;,&amp;quot; &amp;amp; CStr(UBound(aryPatterns) + 1)&lt;br&gt;    tFormula = tFormula &amp;amp; &amp;quot;),&amp;quot;&amp;quot;&amp;quot; &amp;amp; patternList &amp;amp; &amp;quot;&amp;quot;&amp;quot;)&amp;quot;&lt;br&gt;    tFormula = tFormula &amp;amp; &amp;quot; &amp;lt; 2,SETF(GetRef(FillBkgnd),&amp;quot; &amp;amp; bkgndColor &amp;amp; &amp;quot;),&amp;quot;&lt;br&gt;    tFormula = tFormula &amp;amp; &amp;quot;SETF(GetRef(FillForegnd),&amp;quot; &amp;amp; bkgndColor &amp;amp; &amp;quot;))&amp;quot;&lt;br&gt;Dim irow As Integer&lt;br&gt;    If shp.CellExistsU(&amp;quot;User.PatternTrigger&amp;quot;, Visio.VisExistsFlags.visExistsAnywhere) = 0 Then&lt;br&gt;        irow = shp.AddNamedRow(Visio.visSectionUser, &amp;quot;PatternTrigger&amp;quot;, 0)&lt;br&gt;    Else&lt;br&gt;        shp.Cells(&amp;quot;User.PatternTrigger&amp;quot;).FormulaU = &amp;quot;=&amp;quot;&lt;br&gt;    End If 
&lt;p&gt;    'Apply the formula&lt;br&gt;    shp.Cells(&amp;quot;User.PatternTrigger&amp;quot;).FormulaU = &amp;quot;=&amp;quot; &amp;amp; tFormula 
&lt;p&gt;End Sub&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Using+Fill+Patterns+with+DataGraphic+Color+By+Value&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!313.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!313.entry</guid><pubDate>Mon, 17 Mar 2008 12:20:56 GMT</pubDate><slash:comments>0</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!313/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!313.entry#comment</wfw:comment><dcterms:modified>2008-06-17T14:49:41Z</dcterms:modified></item><item><title>Visualizing Information the Smart (Diagram) Way</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!277.entry</link><description>&lt;p&gt;Those of you who are attending the Visio Conference in Redmond this week will know that I am presenting in the developer track.  I am demonstrating some automation examples for building organization charts from SQL Server AdventureWorks database (slightly enhanced) in Visio 2007 Professional, without using the Org Chart Wizard. 
&lt;p&gt;This means that you have far more flexibility with the diagram layout, and it demonstrates Link Data to Shapes, Data Graphics and Pivot Diagrams. 
&lt;p&gt;The example stencil which includes all of the VBA samples used is attached to this post, along with the PowerPoint slideshow, and the SQL Server scripts to enhance the AdventureWorks database. 
&lt;p&gt;&lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/MSVisioConference2008_DJP.vss" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/MSVisioConference2008_DJP.vss"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/MSVisioConference2008_DJP.vss&lt;/a&gt; 
&lt;p&gt;&lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008_DJP.pptx" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008_DJP.pptx"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008_DJP.pptx&lt;/a&gt; 
&lt;p&gt;&lt;a title="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008DBScripts.zip" href="http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008DBScripts.zip"&gt;http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/VisioConf2008DBScripts.zip&lt;/a&gt;&lt;img src="http://c.services.spaces.live.com/CollectionWebService/c.gif?cid=3697690708899476393&amp;page=RSS%3a+Visualizing+Information+the+Smart+(Diagram)+Way&amp;referrer=" width="1px" height="1px" border="0" alt=""&gt;&lt;img style="position:absolute" alt="" width="0px" height="0px" src="http://c.live.com/c.gif?NC=31263&amp;amp;NA=1149&amp;amp;PI=73329&amp;amp;RF=&amp;amp;DI=3919&amp;amp;PS=85545&amp;amp;TP=bvisual.spaces.live.com&amp;amp;GT1=bVisual"&gt;</description><category>Visio</category><comments>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!277.entry#comment</comments><guid isPermaLink="true">http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!277.entry</guid><pubDate>Wed, 06 Feb 2008 06:29:21 GMT</pubDate><slash:comments>2</slash:comments><msn:type>blogentry</msn:type><live:type>blogentry</live:type><live:typelabel>Blog entry</live:typelabel><wfw:commentRss>http://bVisual.spaces.live.com/blog/cns!3350D61BC93733A9!277/comments/feed.rss</wfw:commentRss><wfw:comment>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!277.entry#comment</wfw:comment><dcterms:modified>2008-06-17T14:46:27Z</dcterms:modified></item><item><title>Creating PolyLines From Existing Shapes in Visio</title><link>http://bVisual.spaces.live.com/Blog/cns!3350D61BC93733A9!260.entry</link><description>&lt;p&gt;A couple of posts in the Visio newsgroups got me thinking this weekend.  One was from an Autocad conversant user who would prefer Visio to draw a continuous line between points rather than doing the normal click, hold and drag with line tool because he has tendonitis; and the other wanted to draw a circle centered on a vertex because he is drawing land boundaries. 
&lt;p&gt;Visio has a &lt;strong&gt;PolyLine&lt;/strong&gt; line type, but, as far as I am aware, it can only be created in code - there is no menu or toolbar button to enable you to use it.  It was introduced for converting CAD lines, and is simply a series of X and Y co-ordinates in a single cell, rather than the normal co-ordinate per row. 
&lt;p&gt;Visio has a &lt;strong&gt;Stamp Tool&lt;/strong&gt;, which used to be on a toolbar out-of-the-box, but it seems to have disappeared in Office Visio 2007.  Fortunately, it is simple to put it back by selecting &lt;em&gt;Add or Remove Buttons / Customize&lt;/em&gt; from the down arrow at the end of any of the toolbars.  This will open the &lt;em&gt;Customize&lt;/em&gt; dialog, and then you can navigate to the &lt;em&gt;Drawing Tools&lt;/em&gt; category, and scroll down to &lt;strong&gt;Stamp Tool&lt;/strong&gt;.  You can then click and drag it onto any toolbar, such as the Drawing toolbar in the example below. 
&lt;p&gt;&lt;a href="http://blufiles.storage.msn.com/y1pkvFgsW6TTn7w4mcYXT9H0uyEuPFWwu5HtpIvOqH4JQuj3l58cW07oQgM5Q3lUuQEgNhfzSa1Ktk?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=343 alt=image src="http://blufiles.storage.msn.com/y1pkvFgsW6TTn4WI67cGfA4voQrjkqMklzjIOw5iIgCGBJElemuwObFP1tXuI5k3s_e2ii880X3dfA?PARTNER=WRITER" width=344 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The &lt;strong&gt;Stamp Tool&lt;/strong&gt; enables you to drop a master shape instance with each click of the mouse.  For example, I have selected the &lt;strong&gt;Sector - graphical&lt;/strong&gt; master from the &lt;strong&gt;Visio Extras /&lt;/strong&gt; &lt;strong&gt;Drawing Tool Shapes&lt;/strong&gt; stencil, then I have selected the &lt;strong&gt;Stamp Tool&lt;/strong&gt; and clicked seven times in the page. 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1p5ml5du9jvOyeVAfEgo7pckqK9ph9w-zW-1sYd73K-OmlI6Sgfa84sUvWbLf9GP6u76lpH77Sxsr6Zi2eQD4Krw?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=397 alt=image src="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZD2uL0xpXtYy8_fyl5UgR3MhJuyq5JeuiAqAiktnY8FGOV51RFKKkTa-D6zxL0JQG1IC5myOS15ZHaNHHHebiq?PARTNER=WRITER" width=605 border=0&gt;&lt;/a&gt; 
&lt;p&gt;To stop the &lt;strong&gt;Stamp Tool&lt;/strong&gt;, simply &lt;strong&gt;Pointer Tool&lt;/strong&gt; on the &lt;strong&gt;Standard&lt;/strong&gt; toolbar.  
&lt;p&gt;I have included the &lt;strong&gt;CreatePolyLine&lt;/strong&gt; VBA macro in this post, which has a boolean argument to optionally delete the existing shapes.  To run the macro, simply select the first shape in the sequence that you want to trace a line between.  I have assumed that you would put down a sequence of shapes, then select my macro immediately after re-selecting the first shape in the sequence. Then I selected my macro &lt;strong&gt;DrawPolyLineBetween&lt;/strong&gt; to draw a line between each of the 
&lt;p&gt;&lt;a href="http://j8zpeg.blu.livefilestore.com/y1pHeOR1b4etjZZG94uB8W_HPzwhTVQrojE753fcNpk5v2Atr8HdBnUbwna_p4apoybtYMG6B5-QxrlS7HNCLTGOoo7I3Nm8T6F?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=358 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh2Ve5PFQxlAg_46ogp6qE6u6j_Q-HwFQEy3nru0UIZNEwJhI6qWRmVj0QXDpdrxgPtE92X6xO8DauV5cr5AEqFB?PARTNER=WRITER" width=489 border=0&gt;&lt;/a&gt; 
&lt;p&gt;The &lt;strong&gt;Sector - graphical&lt;/strong&gt; shapes can be modified to snap to the geometry of the new polyline shape, if desired. 
&lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh1Y6MEeDG-J8RcjBmUSFJLqUsbUm2NnDX28pWrQXJlkycYMM2cICaaktUHY4g68lwyYxTkyk95Gs_wMp2t2DH5H?PARTNER=WRITER"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px" height=277 alt=image src="http://blu1.storage.msn.com/y1p-mAN70zrGh3-SLOIDk9-oEPWus8PAQSNvelUbd8Ur6GoJp4vfnHGpxsTB_1uuOq3Rseswx0BAGj19Ecj-SsOzORUryVTHi5e?PARTNER=WRITER" width=250 border=0&gt;&lt;/a&gt; 
&lt;p&gt;Alternatively, you can run the &lt;strong&gt;DrawReplacementPolyLine&lt;/strong&gt; macro to create a polyline shape that automatically deletes the original shapes. 
&lt;p&gt;&lt;a href="http://blu1.storage.msn.com/y1p-mAN70zrGh2OLPSKa-y8JGblncO0O3Zdj3XapuEVWJC2fMx66foC6kj