Sub Macro2 Dim vsoCharacters1 As VisioCharacters Dim i As Integer For i = 1 To ApplicationActivePageShapesCount Set vsoCharacters1 = ApplicationActiveWindowPageShapesIt
This VBA macro loops through all the shapes on the active Visio page and prints the text content of each shape's characters to the Immediate window.
The macro first declares a variable of type Visio.Characters, which represents the text content of a shape. It then uses a loop to iterate through each shape on the active page, retrieves the Characters object for each shape, and prints its text content to the Immediate window using the Debug.Print statement.
This macro can be useful for quickly inspecting the text content of shapes in a Visio diagram.
原文地址: https://www.cveoy.top/t/topic/bW6l 著作权归作者所有。请勿转载和采集!