Solved

Hiding Shape Data on Organizational Chart WebPage Publication

Posted on 2010-09-13
14
1,972 Views
Last Modified: 2012-05-10
I currently have an Org. Chart that is driven off an excel sheet employee database.

I like that all the columns I have in excel display as shape data, however for a "save as webpage" version I would like some of that shape data not to be included; can I hide/unhide certain shape data for the creation of various web-based versions?

Also how do I change the order of shape data so it displays more logically?
0
Comment
Question by:-Polak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 33669276
Polak,

Here's a tutorial that might help you get what you need.

http://www.visguy.com/2006/09/05/the-hidden-world-of-visio-shapes/

Sincerely,

Ed
0
 
LVL 1

Author Comment

by:-Polak
ID: 33673120
I don't think that helps, when I got into the ShapeSheet the only "layers" in there are "Hidden" and "DataGraphic".

All the shapes are auto-linked to an external excel sheet.
0
 
LVL 1

Author Comment

by:-Polak
ID: 33674028
Anybody?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 30

Expert Comment

by:Scott Helmers
ID: 33675237
Are you trying to hide some of the data that appears on the shapes in the org chart? Or are you trying to hide the shape data that appears in the Details pane on the left side of the web-published page?
0
 
LVL 1

Author Comment

by:-Polak
ID: 33675388
Both. Only 3 fields appear on the physical shape, need 1 of the 3 hidden.
And in shape data I need 7 or so hidden.
0
 
LVL 1

Author Comment

by:-Polak
ID: 33675551
I figured out the on shape displyed data, under Organization Chart>Options>Fields tab.
Now i'm concerned with the right-pane stuff.
0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 500 total points
ID: 33675961
OK. Each shape data field has an "invisible" attribute. (Unfortunately, this attribute is called "invisible" in the shapesheet, but is called "Hidden" in the user interface. I realize they mean the same thing but it would be nice if Microsoft used consistent terminology!)

To set the invisible attribute, right-click on a shape and select Data>Shape Data, then click the Define button. Select the attribute you want to hide, and add a check to the box labeled "Hidden". Repeat for additional fields.

f this is something you want to do occasionally, I would recommend that you use the macro recorder to record two marcos: one to hide the required fields and one to unhide them. Or if you prefer to write VBA code yourself, you can use the macro recorder as a guide and then write code to accomplish the same thing. However, the macro recorder may do the trick.

Here's a very useful trick: if you select multiple shapes before  selecting Data>Shape, then the changes you make in the shape data  dialog will be applied to all selected shapes. The macro recorder handles changes to multiple shapes properly as well. However, it only does so on a single page at a time. If you want to apply the same changes to multiple shapes on multiple pages, you will need to write some code.
 
 IRegards,
Scott
 
0
 
LVL 1

Author Comment

by:-Polak
ID: 33676200
"and add a check to the box labeled "Hidden". "
I don't see a check box for this?
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 33676682
The Define dialog should look like the image below...

Hidden.jpg
0
 
LVL 1

Author Comment

by:-Polak
ID: 33677345
Hummmm..... ???!?!?!?!
shapedata.JPG
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 33682888
???!?!?!?! indeed! I don't know why you don't see those options...

I guess that means we'll need to do the equivalent function directly in the shapesheet instead of through the shape data dialog, and it also means that it will be easiest to do it in VBA code. See below -- one macro to hide fields and one to reveal them.

You'll just need to substitute the field names as appropriate (note that you need to change the field name in two places  for each field). I'm altering two fields -- "Telephone" and "Email" -- in my sample code.

Sub HideShapeDataFields()
' hides selected shape data fields on all pages

    Dim pg As Page
    Dim shp As Shape
    
    For Each pg In ActiveDocument.Pages
        For Each shp In pg.Shapes
            If shp.CellExists("Prop.Telephone", False) Then
                shp.Cells("Prop.Telephone.Invisible").Formula = True
            End If
            If shp.CellExists("Prop.Email", False) Then
                shp.Cells("Prop.Email.Invisible").Formula = True
            End If
        Next
    Next

End Sub
Sub ShowShapeDataFields()
' shows selected shape data fields on all pages

    Dim pg As Page
    Dim shp As Shape
    
    For Each pg In ActiveDocument.Pages
        For Each shp In pg.Shapes
            If shp.CellExists("Prop.Telephone", False) Then
                shp.Cells("Prop.Telephone.Invisible").Formula = False
            End If
            If shp.CellExists("Prop.Email", False) Then
                shp.Cells("Prop.Email.Invisible").Formula = False
            End If
        Next
    Next

End Sub

Open in new window

0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 33682924
No sooner had I posted the above when I figured out why you don't see the two options in the Define Shape Data dialog -- they only appear if you are running Visio in "developer" mode.

To turn on developer mode, select Tools>Options, then click the Advanced tab and place a checkmark next to Run in developer mode.
0
 
LVL 1

Author Comment

by:-Polak
ID: 33685158
Okay that worked. How about the logical order of the shape data can that be modified?
0
 
LVL 30

Expert Comment

by:Scott Helmers
ID: 33685502
Also easy to do in the shapesheet...

If you want to reorder fields in an existing drawing, use the code below (note the field attribute of "SortKey" instead of "Invisible").

If you want to change the master in the stencil so that all future instances show data in your desired sequence, that requires a bit more work and is worthy of at least one additional question.

Scott

Sub ReorderShapeDataFields()
' change sort sequence for selected shape data fields on all pages

    Dim pg As Page
    Dim shp As Shape
    
    For Each pg In ActiveDocument.Pages
        For Each shp In pg.Shapes
            If shp.CellExists("Prop.Telephone", False) Then
                shp.Cells("Prop.Telephone.SortKey").Formula = 1
            End If
            If shp.CellExists("Prop.Email", False) Then
                shp.Cells("Prop.Email.SortKey").Formula = 2
            End If
        Next
    Next

End Sub

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visio 2013 - What is this mouse pointer? 2 414
MS VISIO 2013 - features 3 127
How can I populate VISIO from T-SQL? 7 70
Extract Embeded visio objects 3 76
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine lists. We’ll explore containers and callouts in separate articles. Prior to reading th…
Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question