| ...you can do just about anything from a shape double click. There are three techniques you can use, two of which utilize an "overloaded" shapesheet function. RUNADDON is overloaded to execute a line of VBA code if it can't find an addon with the given name. GOTOPAGE is overloaded to jump to a URL if there is no such Visio page. Technique #1: =RUNADDONWARGS("C:\Program Files\Microsoft Office\Office\WINWORD.EXE", "c:\HiThere.doc") Treat Word as a Viso "addon," but qualify it with the full path so that the Office directory doesn't have to be in Visio's addon paths. Technique #2: =RUNADDON("Shell ""C:\Program Files\Microsoft Office\Office\WINWORD.EXE c:\HiThere.doc"", vbMaximizedFocus") The RUNADDON formula will actually execute a line of VBA code if VBA says it parses properly. This call to RUNADDON will be equivalent to the following line in VBA's immediate window: Shell "C:\Program Files\Microsoft Office\Office\WINWORD.EXE c:\HiThere.doc", vbMaximizedFocus I like this technique best because you have control over that second argument to Shell which allows you to specify if you want the resulting window normal, min or max. (Notice the trick you have to use to get quotes properly passed from the shapesheet cell to VBA : double up any quotes which are embedded in the first argument of the shapesheet function.) Technique #3: =GOTOPAGE("c:\HiThere.doc") This technique is most commonly used when you want to jump to a web page in the user's internet browser. Specify "http://www.visio.com" and there you have it. File names also work - you may want to avoid using this technique because we will prompt the user to save the drawing first if it's not already saved. (So that we can give the browser a place to jump back to if the user clicks the back button. |