Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil


    Sponsored Links


  • 1. copy and paste
    I need to copy and paste a sub organization on the same page. I am building a chart with 3 identical sub organizations on the same page. I need all the shapes and text to stay exactly the same.
  • 2. I design my drawing check print preview when i print it is only i.
    I create a drawing in visio print review shows full page when i print it only prints the center of the drawing
  • 3. Need Macro to manipulate the selected object on double clik.
    I need this bad but can't take the time to learn visual basic etc. I need to take a double-clicked object (or keyboard short cut) and: 1. Flip it vertically 2. Rotate 180 degrees 3. If I am now seeing the backside, then apply a cross-hatch without changing the color or other properties. 4. Otherwise I am seeing the back side, (which is cross hatched), so remove the cross hatch. The selected object may be a group. Thanks in advance.
  • 4. Copy Paste
    I am experimenting and learning visio. When I use multiple pages , and try to copy different items (shapes, text) from one page to another, It is always pasted centered on the new page, and not at the exaxt same location as it's origin on the original page. Is there a way to paste on the same position? Thanks, Eira
  • 5. Copy/Paste doesn't work correctly
    I use MS Office 97 and Visio 2000 at work. Whenever I copy a (simple) flowchart from Visio 2000 to MS Office then the image is distorted. Lines have the wrong style (normal instead of dotted), solid backgrounds become transparent, ... At home I use MS Office 2003 with Visio 2002 and to my surprise I have the same problems. To make sure that the problem isn't in the Word document or Visio drawing I started from scratch, but still no luck. I tried everything, but even pasting it as WMF/EMF doesn't help. Only the Device Independant Bitmap seems to work fine, but this doesn't look very good in printed material. What could be the problem? I have checked the newsgroups and found out that more people have this problem. We have payed a lot for Visio and it's a great piece of software, but such a simple thing like copy/paste should work to make it usable. What could be the problem?

Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

Postby google » Fri, 10 Mar 2006 12:19:04 GMT

i all. I've been banging my head against the wall here, and would
certainly appreciate a hand.

I'm working on a reasonably-sized org chart of 400 companies using the
Org Chart US Units template & stencil. The source is an Excel sheet
with a combination of entered text, numbers, and formulas. Some of the
columns are used to modify the appearance of the shape instance, for
example, if the parent company is A, then the outline is regular black.
But if it's B, then the outline is blue. Or if another value is C,
then the shape is a regular rectangle, but if it's D, the corners are
rounded to become a rectangle.

I've made a number of changes in the master shapes in the document
stencil. (In fact, I don't use the "official" stencil at all, and I
really wish I could make it stop loading and filling my document
stencil with shapes I don't want and haven't used each time I open the

Imports are done by erasing all shapes on the current page and running
Organization Chart --> Import Organization Data. Similar results occur
if the Master Shape is copied into a new document and the process is

There's a fair bit of text in some of the shapes, so I want to increase
their size. In the Document Stencil's copy of the Master Shape of
Position, the formula for Height is SETATREF(User.Height). So I
changed User.Height from 0.5 in*DropOnPageScale to 1
in*DropOnPageScale. The master window shows exactly what it should - a
taller shape. When I save and update, none of the instances of
Position grow in height. Checking a ShapeSheet indicates the
User.Height cell still has the formula of 0.5 in*DropOnPageScale. This
doesn't update even after the shapes are re-imported or fiddled with in
the drawing window. (User.Width behaves similarly. I've set it to 1
in*DropOnPageScale in the ShapeSheet, but a random shape has the
formula of 1
which is the stencil default.)

Another example: In the spreadsheet, there's a column specifiying the
layer membership. The formula evaluates to something like 0;3;5 for
membership in those layers. It goes into a ShapeSheet cell called
Prop.Layers as "0;3;5". In the Master's Layer Membership section, the
formula SETATREF(Prop.Layers) should set the shape's layer value at
creation or refresh. But picking a random shape shows that despite a
value of "0;3;5" in Prop.Layers, Layer Membership is simply "". The
View Layers dialog indicates there are 1072 shapes in layer 0 (and none
elsewhere), but Select By Type finds nothing when I ask it to locate
anything in layer 0.

(I've worked around this with:

Sub SetAllLayers()
Dim MyShape As Shape

For Each MyShape In ActivePage.Shapes

If MyShape.Master.Name = "Position" _
Or MyShape.Master.Name = "Manager" _
Or MyShape.Master.Name = "Executive" Then

MyShape.CellsSRC(visSectionObject, visRowLayerMem, _
visLayerMember).FormulaU = "Prop.Layers"

End If

Next MyShape

End Sub

but I don't want to depend on code, because someone would need to
remember to run it.)

Some things work fine. In FillFormat.FillForeground, I refer to
Prop.ocwiz_14, which contains an RGB function. In
LineFormat.LineColor, a combination of IF and STRSAME finds a value in
another cell and appropriately chooses a LineColor

Re: Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

Postby Mark Nelson [MS] » Fri, 10 Mar 2006 14:45:03 GMT

he problem you are encountered has to do with inheritance between masters
and shape instances. When you drag out a shape from a stencil, you are
creating a shape instance from the master in the stencil. Initially all the
properties (i.e. Shapesheet cells) on the shape instance inherit their
values from the master shape. This means that if the cell in the master
shape changes, the cell in the shape instance changes too.

However, it is possible for the user (or the Org Chart application) to make
changes directly on the shape instance. Visio automatically changes the
PinX and PinY cells to match the position of the shape instance on the page.
If you change the fill or line color, those cells get changed on the shape
instance. Once a cell is set in the shape instance, that cell no longer
inherits from the cell in the master. Thus your master changes do not

In your case, the Org Chart application is changing the User.Width and
User.Height cells as the shape instance is dropped on the page.

However, in the case of shape size and a few other settings, you can specify
what you want directly in the Organization Chart > Options dialog. No
master editing is required.

Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

< XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...

Re: Visio 2003 - Org Chart from Excel Ignores Modified Masters in Document Stencil

Postby google » Sat, 11 Mar 2006 13:49:35 GMT

otcha. So the inheritance could either be taking place from my
modified shape and then the Org Chart app is overwriting it, or the Org
Chart gets its info from the "official" shapes and only some of my
modified shapes' properties come through after the fact. If the
latter, it seems impossible to predict which will work and which won't.
Quelle drag...

Either way, it looks like a code-based "cleanup" approach after the
import will be required. I want my end users to have to do as little
as possible, a sort of "step 1 -- import, step 2 -- click the magic
button" approach.

Thanks though Mark! Now I just need to ice my head. :-)

Neman Syed

Mark Nelson [MS] wrote:

Similar Threads:

1.Microsoft Visio templates - Stencil for Visio to create IT diagrams & network design

2.Modifying masters in a stencil

Dear All,

I would like to programatically modify a stencil by changing the name and
some properties of the contained master shapes. (The name I want to change
is the name that is displayed below each master in the stencil.)
This is to be implemented in a C# application. However, for testing I wrote
the VBA macro below.

The macro works fine if the stencil is open for editing (mouse click onto
the top left corner of the stencil, then click "Edit").

Question: How can I enter a stencil's edit mode programatically? I tried
this via the AllowEditing flag or by closing and re-opening the stencil with
the 'visOpenRW' flag. Unfortunately, both did not work. I found several
newsgroup threads concerning this issue, but none of them really helped me.

Thanks a lot in advance for any hint!

Best regards,

Public Sub UpdateStencil()
    Dim myStencil As Document
    Dim myMasters As Masters
    Dim myMaster As Master
    Dim myMasterCopy As Master
    Dim myShape As Shape
    Dim index As Integer
    Dim win As Window

    On Error Resume Next

    Set myStencil = Documents("My Stencil.vss")
    myStencil.Title = "New Title"
    Set myMasters = myStencil.Masters
    For index = 1 To myMasters.Count
        Set myMaster = myMasters(index)
        Set myMasterCopy = myMasters(index).Open
        Set myShape = myMasterCopy.Shapes(1)
        myMaster.Name = "New Name"
        myShape.Cells("User.ELEMENT_ID").Formula = 12345
    Next index
End Sub

3.Modify selection of masters in stencil?

I have a C# application hosting a Visio ActiveX control. The
application enables the user to create new masters (programatically).
However, when a new master is created (using Stencil.Drop()), it gets
selected, in addition to the already selected masters.
I know I can get the currently selected masters list from the windows
of the stencil, but is there a way to modify this selection?


4.Export to Excel, then to Visio (Org Charts)

I am trying to export my database to into Visio so I can automatically create 
org charts. I am having a problem with the names. 

If I have a contact named John Smith, Outlook exports the name as SmithJohn 
in the name field. That is what Visio keys off of (manager name) to figure 
out how to organize the org charts. I am trying to figure out how to export 
the name normally. I have changed the file as setting and it does not do 

If I go in the file and manually change the name to John Smith, the org 
charts work perfectly. 

Anyone have any ideas?
Below is an excerpt from my file.

Name	               FirstName1	    LastName1	  JobTitle          ManagersName1
WhitacreEd	              Ed	Whitacre	  President & CEO	
CicconiJames	           James Cicconi	          VP                      Ed 
StephensonRandall	Randall	Stephenson	COO	                Ed Whitacre


5.visio org chart using excel spreadsheet

I followed the instructions and created my org database and my new org chart. 
 However, one person reports to two manager so I need to create a dotted line 
second connection.  Can that be done using the excel spreadsheet or must I 
add it to the org chart when completed?

6. Visio crashes when exporting Org Chart to Excel

7. Mulitple level (4 level) visio org chart from excel - possible

8. Link Excel Spreadsheet to Visio Org

Return to VISIO


Who is online

Users browsing this forum: No registered users and 45 guest