If you have any ideas on how we can make Visio Guy a better, more useful web-site, then we’d love to hear your comments!
We’ve added a forum, which is a much better vehicle for receiving- and responding to your comments.
Because of the forum, we’ve closed comments on this page. We are excited to see your feedback!
I have a friend who doesn’t have visio but who needs to be able to edit a document I currently have in visio format. So I want to convert a visio flowchart into ether microsoft word, excel, or powerpoint so its editable there. I understand that flowcharting capabilities in word (the drawing toolbar) are not as robust, but I was wondering if there was a way to convert.
Thanks,
Brian
Hello, Visio Guy!
thank you for your site and your work
themes i d like to see: how to automate the process of drawing all types of diagramm as add-on Organisational Chart does. For example: you make excel file to input in Visio and code draws diagram, connect shapes in the order you define in excel table (it works in Organizational chart – you can define the order of connection, another words, hierarchy, but orgchart add-on cant be modified for my needs:(
another theme: you drew a diagram and used a stencil. and now you d like to replace shapes on diagramms by another shapes from another stensils in the same order (it works in Organisational Chart – there you define the name of shape: manager, vacancy, executive etc.)
best regards, ivan
Russia:)
Can you please help me to solve this:
I have an excel file. How can I import data from this file into shapes in which each shape will display data of each cell of excel file.
For example:
Data in Excel file:
Unique_ID Name Class
1 AA 2
Any three shapes in a drawing.
How can I display “1” in shape 1, “AA” in shape 2 and “2” in shape 3 automatically? Can you please suggestion some ways? Please answer ASAP
Thanks and Best regards
Hi Visio Guy,
I’m having the same problem of non working hyperlinks but with visio 2007. And your correction tool is not working with it at all and I tried a lot of work arounds and all failed.. Would you please help me.. thx
Chris,
This site provides valuable information for users that are not quite developers, but need to perform complex and advance operations. Keep up the good work.
I would like to apply a gradient to text in Visio 2003, but my many attempts have not met with success. Perhaps this capability is beyond the native capabilities of Visio. I have seen examples of gradient application to text backgrounds, but never to the text itself.
Thanks in advance for your assistance,
Steve S
Hi Steve S,
Visio doesn’t support gradient fills inside of text, unfortunately. The usual work-around is to import WordArt objects. You can create WordArt inside of Word, Excel or PowerPoint, I believe. I think it’s located under an italic/3D “A” icon, usually located on one of the toolbars that lives at the bottom of the window.
Cheers,
Chris
I’m sure this task I’d like to do is incredibly easy but I haven’t found the right combination of prods to get me there.
What I want is a shape that displays the date on which it was dragged into the drawing. The date/time fields cause automatic changes, I don’t want this thing to change once it’s been added to the drawing.
Great site. Thanks for your efforts.
Hi DGD,
You can do this with a little bit of ShapeSheet trickery: Create a user-cell or custom-property (Shape Data field) to hold the “Drop Date”, for instance:
User.dropDate = NOW()
Then, in the Events.EventDrop cell, enter this formula:
=SETF(GetRef(User.dropDate),User.dropDate)+SETF(“EventDrop”,””)
When you drop the shape, the EventDrop cell will write the value of the User.dropDate cell over the formula, so you won’t have a NOW() function that keeps updating.
The last bit of the formula; + SETF(“EventDrop”,””), erases the formula in the EventDrop cell, so that copies of your shape won’t get a new drop date.
Remove this portion of the formula if you want the functionality to be there even for shapes that get copied.
– Chris
Thanks Chris, works great!
Hello,
I haven’t come across any article that can show how to attach a macro to a custom menu item.
I am trying to do that. Is this possible ?
Hi,
I really like the site. I use Visio all the time and you have some great tips.
I recently purchased 2007 and I’ve run into an issue: You can’t change Line Width on dedfault shapes anymore (You’re stuck with “3”). In 2003 you could change line width, fill etc. on the default shapes, but I have found that does not work in 2007. Even if you change the properties in Shape Sheet it displays the correct line width, but the shape does not reflect the change. The only work around i have found is to move over shapes from 2003. Do you have any other ideas?
Robert
Hi Robert,
I wonder if your LineWeight issue has to do with the new Theme feature? I noticed that if you apply a Theme Effect to, say, Flowchart shapes, then manual changes to the LineWeight don’t show up. If you revert to a Theme Effect of “None”, then your manual changes show.
If you look in the ShapeSheet, in the Line Format section, you’ll see formulas that look like this:
LineWeight = THEME(“LineWeight”)+THEMERESTORE(3.12 pt)
Is this what you’re seeing? Which templates/shapes are you using?
– Chris
Unfortunately I’m using V Professional at work and I don’t have the ability to look at the ShapeSheet properties for “Shapes” only the page. I had the same LineWeight problem with my MSDN version at home but don’t have it available to try your theme fix.
The Shapes I’m having the problem with are in the Detailed Network template. I can’t get the “Server” line weight to change form 3. Actually I can’t get any of the shapes (besides basic annotations, boxes, lines, etc.) in the template to change. I draw some pretty small/detailed diagrams and the line weight is way too thick when you shrink the shape.
If you think of something let me know…otherwise I’ll use the 2003 shapes.
Robert,
Those shapes seem to have LineWeight protected, via a GUARD formula in the ShapeSheet. If you are comfortable running VBA (or have permissions!), this code snippet will allow you to reduce the lineweights of all shapes on a page, or all masters in a document to ZERO. LineWeight = 0 in Visio is very nice for detailed drawings. It simply draws the thinnest possible line (it does NOT make the line disappear!)
Just hit Alt+F11 to get into the VBA editor, and paste the code below into the editor. Then, just place your cursor in either the sub: ReduceLineWeightsForLocalMasters, or ReduceLineWeightsForShapesOnpage and press F5.
The actions are undo-able, so you can get rid of the changes. ReduceLineWeightsForShapesOnpage simply edits all shapes on the active page. ReduceLineWeightsForLocalMasters edits the masters that are in the Document Stencil, so all instances of all shapes will be changed (including non-network shapes!)
Maybe this will get you going on the right track,
– Chris
The code:
Sub ReduceLineWeightsForLocalMasters()
Dim idScope As Long
idScope = Visio.Application.BeginUndoScope(“Reduce LineWeights for All Local Masters”)
Dim mst As Visio.Master
Dim shp As Visio.Shape
For Each mst In ActiveDocument.Masters
Call m_reduceLineWeightForMaster(mst)
Next
Call Visio.Application.EndUndoScope(idScope, True)
End Sub
Sub ReduceLineWeightsForShapesOnpage()
Dim idScope As Long
idScope = Visio.Application.BeginUndoScope(“Reduce LineWeights for All Shapes on Active Page”)
Dim shp As Visio.Shape
For Each shp In ActivePage.Shapes
Call m_reduceLineWeightForShape(shp)
Next
Call Visio.Application.EndUndoScope(idScope, True)
End Sub
Private Sub m_reduceLineWeightForShape(visShp As Visio.Shape)
visShp.CellsU(“LineWeight”).ResultIUForce = 0
If visShp.Shapes.Count > 0 Then
Dim i As Integer
For i = 1 To visShp.Shapes.Count
Call m_reduceLineWeightForShape(visShp.Shapes(i))
Next i
End If
End Sub
Private Sub m_reduceLineWeightForMaster(visMst As Visio.Master)
Dim visMstCopy As Visio.Master
Dim shp As Visio.Shape
Set visMstCopy = visMst.Open
Set shp = visMstCopy.Shapes(1)
Call m_reduceLineWeightForShape(shp)
visMstCopy.Close
Set shp = Nothing
Set visMstCopy = Nothing
End Sub
I was hoping you could E-mail me with a little advice. I put together a number of custom shapes that I think would be useful to anyone who works with bands, theaters, stages, etc.. (see my site for examples) I was thinking of selling collections of these custom shapes, but after doing some research, I see so few collections of shapes for sale. Maybe I am looking the wrong place, or there is just no market for such things. What is your experience? Many thanks.
Wow…Thanks for the tip and code. I’ll try it out tonight, Thanks!
Caught me in a good mood 🙂
– Chris
I have an issue that I bet you can help me with. Whenever I import a graphic bitmap into Visio, it’s always softened and fuzzy. This happens to any PNG or GIF or other bitmap I import via Insert > Picture > From File…
Is there a way to make Visio not soften my gfx?
Thanks,
Derek
I’m using Visio to prototype webpages. I’m able to use the hyperlink function satisfactorally, but I have an additional need to create drop-down menus, and text fields that allow a user to input data (there does not need to be a backend on this).
Is there an existing too, or can you point me in the right direction as to a way to develop this function on my own? Thanks!
Chris et al – Do you know if Visio has any capability to freeze a column of information as the user moves to the right or left in a process flow diagram with swim lanes. It would be helpful to be able to do this on a long process flow chart similar to the way an Excel spreadsheet allows you to freeze rows or columns.
Hey Gary,
No “Freeze Panes” that I can think of off-hand, but you can open a second window onto the same drawing page…so with some clever tiling.
With a bit of code and automation you could get one window to scroll with another and build something more elegant, either in Visio or with the Visio Active X control. Maybe a bit too much of an effort, though.
– Chris
Hi,
Re: Visio 2003
I’ve created an organisational chart through importing a table from an Access db.
The table has a ParentID field which Visio has used to create the chart and the relationship between shapes.
I can refresh the chart and it will update the information of existing shapes within the chart.
If I was to add or delete new records to the table in the Access db, would it be possible for Visio to remove or insert new shapes into the existing chart automatically?
I’ve tried refreshing the chart after removing a record in the DB, but that only results in an error message which states: ‘cannot find linked record in database table for shape…’
Thanks,
Nadeem
I’ve been trying to use Visio 2003 to draw up some rack diagrams for our equipment. I’ve been able to work with the standard stencils, but there is one piece of functionality which seems to be missing, and I was wondering if anyone could shed some light on how it could be done. Specifically when using the standard Rack or Cabinet shapes, there appears to be no way to label the U numbers at the side of the rack. I understand that the drawing will show the height of various devices, but I’d like to see the actual location numbers for the devices instead. Can this be done without too much trouble?
Thanks,
Troy
Hi Troy,
The Rack Unit Dimension Line might help you!
http://www.visguy.com/2007/04/01/rack-unit-dimension-line/
Is there any way to turn a text to perspective shape in vision 2003?
Please reply me to mailto:basheerpt@alwefag.com
Hi,
I’m trying to create hyperlinks automatically based on the text of a shape.
I’ve figured out how to extract the text I’m after with the following code.
Dim VsoSelect As Visio.Selection
Dim VsoShape As Visio.Shape
Set VsoSelect = Visio.ActiveWindow.Selection
If VsoSelect.Count > 0 Then
For Each VsoShape In VsoSelect
LongName = VsoShape.Text
ShortName = Right(LongName, 11)
Check = Left(Right(ShortName, 7), 1)
If Check = “-” Then
ShortName = Right(LongName, 10)
End If
Next VsoShape
Else
MsgBox “You Must Have Something Selected”
End If
What I’m stuggling with is how to insert that as a relative hyperlink.
Or perhaps there’s an easier way that I’ve missed?
Hello Visio Guy,
I have spent countless fruitless hours searching for answers to the following questions, and I suspect what I want to do can’t be done in Visio. I’d be delighted if you prove me wrong.
1. Does Visio have a way to nudge text using the keyboard, without moving the shape containing the text?
2. Is it possible to align text on a line with text on another line?
3. Is there a way to evenly distribute connection points on a shape?
I’m using Viso 2003 SP2.
Thanks,
YossiD
Yo YossiD,
1. There’s no nudge feature for text, but the arrow keys do nudge the shapes. But if your shape only contains text, then I suppose you could call it “nudging the text”…BTW, you can use Shift+Arrow and Ctrl+Arrow to reduce the size of the nudging.
2. There’s no built-in feature to align text from two different shapes, which is what I think you are asking for. But Visio has a full automation model, so you could write code to analyze shapes and tweak their text locations.
3. Again, you could distribute connection points on a shape using code. But when you add connection points to a shape using the UI tools, they are positioned proportionally by default, so if you space them equally, your distribution will remain the same. If you wanted to do something like: “add 10 points to this shape, distributed horizontally”, then code is the way to go.
You can play with code and Visio using the built in VBA editor. Just hit Alt+F11 if VB is something you’re comfortable with!
Hope this helps,
– Chris
Adam…hyperlinks,
Have a look at the VBA/developer reference help for the Address property of the Hyperlink object. It says this:
“Setting the Address property for a Hyperlink object is equivalent to entering information in the Address box in the Hyperlinks dialog box (Insert menu), or setting the result of the Address cell in the shape’s Hyperlink.name row in the ShapeSheet window.
The Address property value can be a DOS, UNC, or URL path, for example, “driveletter”:\”foldername”\”drawingname”, \\”servername”\”foldername”\”drawingname”, or http://address, respectively.
If the Address property is relative, for example, “..\”drawingname””, it is composed against the HyperlinkBase property, if supplied, or the hyperlink’s document path. If the document is not saved, the hyperlink is undefined.
If the Address property is empty, you can assume the address points to a page in the document that contains the page. In this case, the SubAddress property contains the name of the drawing page to which the hyperlink navigates.”
You will find the Hyperlink Base field under File > Properties, at the bottom of the dialog. HyperlinkBase is also, of course, a property of Document objects.
Hopefully this will help get you further along!
– Chris
Hi there,
I have a query which I am hoping you can help me with. I have been asked to build a basic process flow in VISIO which will be used by project managers in our division. We want to make it as simple as possible and the tasks within the flow are basically a checklist for them to ensure they have completed the steps required. We want to make it visually easy for them to track and was thinking for each task (shape) to have a starting point of “NOT STARTED” and coloured red. We want them to be able to either select NOT STARTED, IN PROGRESS or COMPLETED and have a correspond colour to that shape depending on what they select. (eg: red, green, yellow).
My GM wants to present this to the powers above and we would like to have this up and running in a couple of weeks. My skills are so basic, that the most advanced thing i can do is add a hyperlink. So I was wondering if there is a kind soul out there that can help me out. I know visually what i want, and from reading the different visio blogs etc. (ie: visio guys’ checkbox – box of contents) that it must be possible?
Hi !
I hope you can help me on this :
I want to create a shape with some basic Custom Properties that can’t be deleted (just edited) and also give the possibility to add other Properties that can be deleted. The “LockCustProp” cell locks all the properties, is there a possibility to protect only a subset of the Properties ?
To VISIO DUMMY :
I’m not an advanced user of visio, but I think it’s possible :
Edit your Master-Shape, then Right-Click on the Shape, “Data”, “Add Data Graphic” then add a “Colour on Value” data graphic. Then you can add the values your property can have (NOT STARTED, IN PROGRESS and COMPLETED) and assign colour to these values.
Hope it can help you !
Have you found any stencils for railroad track layouts? There is only 1 curved track section that I can not adjust the radius of, also any crossover ones? I’ve look on some model railroad sites, no luck
thanks
Hey Jeff19,
I found these Visio train track layout shapes on Stan’s Trains website.
Maybe they will get you started!
– Chris
Hi Visio Guy
I am creating stencils & templates which will be released to our Firm. I have created new stencils with our company’s look and feel, some stencils are interactive eg, bar chart you can choose how many bars by right+click (taken & formatted from Visio’s chart stencil). Question: why is it interactive on my laptop, yet when I save these stencils to my test user c:\program files\…\visio11\1033 and my tester opens up the *.VST the customised stencils are there, yet not interactive? Is there another directory it is saving/searching to that i don’t know about?
On another matter, is there any way of changing the pooky green background of the stencils? Or am I asking too much?
Hi Chris,
I have a question for you. Could Visio be used for techncial fashion drawings? Are there templates, stencils available?
Thanks,
Gina
Hi Chris,
Just a quick query. Is it possible to use Visio to create techncial fashion drawings? Are there templates and stencils available? Has this been done before?
Thanks,
gina
Hi Gina,
You’ve inspired a new article! Have a look at: Visio For Fashion Design?
Cheers,
Chris
Hello Chris,
Thanks for your reply to my previous queries. Of course I’d rather Visio had built-in ways to do what I want, but at least now I can stop looking.
Here’s another one.
In Word, the Alt key defeats the snap feature when using the mouse to move things (margins, tabs, table cell borders, text box sizes, etc.). Is there a similar way to temporarily turn the snap feature off in Visio? If not (as I suspect) could one write some kind of global macro to do that?
Happy Thanksgiving!
YossiD
Chris,
Back in 1999 David Edson put an article on MSDN about using VBA to create Intelligent Connections at http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvisio/html/wiringdiagrams.asp.
In the article, he says, “Chris Roth, a brilliant team member of mine at Visio, created the sample wiring diagram that is the core of this article.”
I completely agree with him, this is an amazing example. Have you done any more work along these lines, or can you provide additional insight into how I could incorporate this into my drawings?
Best Regards,
Joe Mako
Joe,
Thanks for the nice words!
And thanks for pointing to the MSDN link — I was going to re-publish this article on Visio Guy, because I only knew of one other link, which was broken. Nice to see the example is alive and well out on the web.
I was thinking writing an article the describes how to get two text-blocks on a single connector.
Also, if you are into schematic wiring diagrams, the folks over at d-Tools have products that do this very well. But their stuff is targeted specifically for system installers (A/V, home entertainment systems, board rooms, virtual meeting centers, etc.)
Cheers,
– Chris
Chris,
Two text-blocks on a single connector is exactly what I am trying to do today. (should that take me a full day to figure out?)
Also, because of your work I was able to find:
Developing Microsoft Visio Solutions
There is so much free info at MSDN, the hard part is finding it.
Have you written any books on Visio? Or can you recommend any book for taking advantage of VBA and ShapeSheet?
I have showed your Intelligent Connections example to a few people and they see it as highly useful. Once I am able to wrap my head around what you did, I’ll use it on all my future diagrams that include connections that move over time. Maybe I’ll be able to generate a diagram with appropriate ShapeSheet data pragmatically from a table. Then all I’ll have to do is connect the dots so the link data will fill in using your code.
There very well may be software out there that does what I want, but there is joy in discovering how to do things with the software that you have.
Best Regards,
Joe Mako
Hi Joe,
I haven’t written any books, but am contemplating making shorter, targeted e-books sometime soon.
There is one book that I really like, and have reviewed on this site. Have a look at this post: Book review: Visualizing Information with Microsoft Office Visio 2007
Ciao,
Chris
Chris,
I’m new to VBA & macros & I need to create a small macro to run a find/replace function.
I’ve created a stencil set for electrical schematics with the text “w#” on each of my wires.
I would like to run a looped macro that finds “w#” in the shape text and replace with a number (n).
Once the number has been replaced, n increments by 1, and the loop repeats. This would then search the whole document & replace all instances of “w#” with dedicated numbers.
I have run the find replace function via macro recorder but this doesn’t appear to give me all the necessary code I need(below). I do not know how to find the itemID that contains the required text and the macro recorder doesn’t show the code for find/replace!
Sub Macro2()
Dim vsoCharacters1 As Visio.Characters
Set vsoCharacters1 = Application.ActiveWindow.Page.Shapes.ItemFromID(199).Characters
vsoCharacters1.Begin = 0
vsoCharacters1.End = 2
vsoCharacters1.Text = “text”
End Sub
This will replace the text in shape 199 & replace with “text”.
Thanks for any help in advance.
Nice site with some useful info.
regards,
Wayne.
Hi Wayne!
Try this bit of code – hopefully it is self-explanatory enough:
Dim shp as Visio.Shape
dim iCt as integer
iCt = 1
For each shp in Visio.ActivePage.Shapes
if instr(1, shp.text, “w#”, vbTextCompare) > 0 then
shp.text = replace(shp.text, “w#”, Cstr(iCt))
iCt = iCt + 1
end if
Next shp
Note: if you have grouped your shapes, this will not dive-down into the groups. In that case, you’ll have to recurse through the sub-shapes of each group. These are simply obtained via shp.Shapes.Item…
Hope this gets you started,
– Chris
Chris,
Thanks for the quick reply.
I will hopefully be implementing this before Xmas.
If all goes well I will post the macro/script so it can be used on this site.
Many thanks,
Wayne.
I am using the “save as Web page” feature in visio 2003.
After I publish it and OK the Active X control boxes, I would like the hyperlinks to show up in the same frame (Left – table of contents, Right – my picture). I want it on the right.
Currently, it opens it in the same window and i have to use back button of browser. If i can put it on the right frame, then users can use the TOC on left frame to navigate.
please help. thanks
Sam
Can you try to publish some info about using custom shapes (ie. not geometry) in an icon set? The MSDN Data Graphic article seems to suggest it is possible, yet I have only seen it done with either geometry or images.
Your site is great and appreciated very much 🙂
Cheers
Nathan
hi
i wana ask is there a way to click on the shape so it will expand ??
please help me