Solved

Hiding Shape Data on Organizational Chart WebPage Publication

Posted on 2010-09-13
14
1,768 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
  • 7
  • 6
14 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
Comment Utility
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
Comment Utility
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
Comment Utility
Anybody?
0
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:-Polak
Comment Utility
"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
Comment Utility
The Define dialog should look like the image below...

Hidden.jpg
0
 
LVL 1

Author Comment

by:-Polak
Comment Utility
Hummmm..... ???!?!?!?!
shapedata.JPG
0
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
???!?!?!?! 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
Comment Utility
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
Comment Utility
Okay that worked. How about the logical order of the shape data can that be modified?
0
 
LVL 30

Expert Comment

by:Scott Helmers
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 I’ll describe a mashup of containers and lists that meet a real-world need. Prior to reading this ar…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now