For Each vso Shape In vso Select Set vso Connects = vso Shape. From Connects'For each connection, get the shape it connects to. Name = Mastr Name Full File Name = Path Name & Dirs(Dir Indx) & "\" & Curr File Name Set shp Obj = master Obj.
Count 0 Then'For each shape in the selection, get its connections. Name Next vso Connect Set vso Connects = vso Shape. Add Mastr Name = Left(Curr File Name, Len(Curr File Name) - 4) master Obj.
Print "Background Colour Palette Entry = "; Palette Entry, Debug.
Green End Sub Public Sub Colour_Test1()Dim objshape As Visio.
Shape Dim i As Integer, Shp No As Integer Dim Pos X As Double, Pos Y As Double Dim Shape X As Double, Shape Y As Double Debug.
Green Next End Sub Public Sub Connection Points()Dim shp Obj As Visio.
The original source of some of these items is from messages posted on the Visio internet forums or the Visio Compu Serve forums.
There is no warranty that these are the best solutions, they just work: If you do not find what you want, post a message to the Visio VBA newsgroup microsoft.public.visio.If you would like to contribute a code segment, also post it to the Visio VBA newsgroup.
Sub Add Shape Numbers()' Set numbers for each shape on all the pages of all the documents within a directory' The changes are done in a temporary directory in case a problem arises. Shape, Palette Entry As Integer, vcolors As Colors Set sh Shape = Visio. Green Next End Sub Public Sub Test Colour()Dim sh Shape As Visio. Formula will now return the one character string 1. Char Props Row(vis Bias Left)Next End Sub Sub Get Char Rows()'The Characters object deals with fields a bit differently than the labeling'in the Shape Sheet window. It analyzes the text in the first shape in the selection and finds runs'of Text in the shape that corresponds to each of the rows in the Characters section.'For simplicity work on the first shape in the selection Dim vso Shape As Visio. Characters' The initial characters object return from the Characters Property of the' shape spans all the text in the shape.(warning - This may not be true if the first character of the text block is a carriage return)Set vsochars = vso Shape. Char Count While (i 1 Public Sub Circle_Shape()' This routine will add a circle around a shape Dim page Obj As Visio. It expects the'active window to be a drawing type window and for at least one shape to be'selected. Item(1)Dim int Char Count As Integer Dim int Run End As Integer Dim int Run Begin As Integer Dim i As Integeri = 0Dim vsochars As Visio. Shape Dim local Centx As Double, Shape Height As Double Dim local Centy As Double, Shape Width As Double, Shape Radius As Double Dim cel Obj1 As Visio. Cells("Fillforegnd") = 5 ' Use a fill colour of Yellowshp Obj.