A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Visio
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sort Shape Layer Names



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2008, 10:02 PM posted to microsoft.public.visio.general
Keith
external usenet poster
 
Posts: 531
Default Sort Shape Layer Names

I have over 30 layers in a large diagram. When I select the menu item
ViewLayer Properties, I can sort the layer names into ascending or
descending sequence by clicking the "Name" button. When I right-click a
shape and select FormatLayer, the layer names on the Layer dialog window
are not displayed in alphabetic order. How can I sort the layer names on the
Layer dialog window?
  #2  
Old July 8th, 2008, 11:14 PM posted to microsoft.public.visio.general
Keith
external usenet poster
 
Posts: 531
Default Sort Shape Layer Names

This is an update to my original question... I recorded a macro to see what
Visio does when a new layer is assigned to a shape. The results we

Sub OpenShapeLayerDialog()
'
' Open the Layer dialog window for the select shape.
'
' Keyboard Shortcut: Ctrl+Shift+K
'

Dim UndoScopeID1 As Long
UndoScopeID1 = Application.BeginUndoScope("Layer")

Application.ActiveWindow.Page.Shapes.ItemFromID(46 ).CellsSRC(visSectionObject, visRowLayerMem, visLayerMember).FormulaU = """0;1;2;62"""
Application.EndUndoScope UndoScopeID1, True

End Sub

The numbers 0, 1, 2, and 62 are indexes, beginning with zero, into the layer
name list that's displayed on the Layer dialog window. It's not an index
into the sorted list that's shown on the ViewLayer Properties window. So
if the list is sorted, it has to be able to determine what the index number
is supposed to be.

I'm not much of a VBA programmer, so I can't provide much more info than
this. It may be that I'll have to write my own dialog window. Or it could
be an enhancement to Visio! :-)

--
Keith

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.