在Visio中查找工作流对象3D
我正在尝试在VBA Excel中创建一个代码,以检测工作流对象中的内容-3D如下图所示:
图片始终相同。我已经能够找到并选择单元格内部的句子。但是我需要它在不同的visio中搜索所有工作流对象。
这是我要的地方: DIM图表服务作为整数 DibargramServices = ActivedOcument.diagramServicesEnabled ActivedOcument.diagramServicesEnabled = visserviceversion140 + visserviceversion150
Dim vsoCharacters1 As Visio.Characters
Set vsoCharacters1 = Application.ActiveWindow.Page.Shapes.ItemFromID(228).Characters
Debug.Print vsoCharacters1
我需要代码才能首先在Visio中的不同页面中查找所有工作流对象,然后在(vsocharacters1)中获取句子。
I´m trying to create a code in vba excel to detect what´s inside the work flow objects - 3D as the ones shown in the following picture:
The pictures are always the same. I have been able to find and select the sentence inside the cell. But I need it to search for all the work flow objects in different visio.
This is where I got to:
Dim DiagramServices As Integer
DiagramServices = ActiveDocument.DiagramServicesEnabled
ActiveDocument.DiagramServicesEnabled = visServiceVersion140 + visServiceVersion150
Dim vsoCharacters1 As Visio.Characters
Set vsoCharacters1 = Application.ActiveWindow.Page.Shapes.ItemFromID(228).Characters
Debug.Print vsoCharacters1
I need the code to first find all the work flow objects in different pages in visio and then obtain the sentence within (vsoCharacters1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请尝试此简单代码
注::
该代码始于MS Visio,无递归的代码,找不到分组的形状!
Please try this simple code
Note:
This code started in MS Visio, code without recursion, dont find shapes into groups !
我可以提出一种更系统的方法吗?
如果您幸运的话,专业人士已经制作了这种形状,并将其命名为子形状,例如标签,框架等。这将简化对此形状的访问。
在VBA中:
这也适用于子形状的子形状。
否则 - 子形状被命名为表。234-您需要找到另一种标识方法。
例如:
顺便说一句,您无需访问形状的字符对象即可获取其文本。它只是“ shp.text”。字符对象更加复杂,可以让您用文本做有趣的事情。
May I propose a more systematic approach?
If you're lucky a pro has made this shape and named the subshapes eg Label, Frame, what ever. This will simplify the access to this shape.
in VBA:
This works also for the sub-shapes of the sub-shape.
Otherwise - the sub-shapes are named sheet.234 - you need to find another identification method.
eg:
By the way, you don't need to access the characters object of a shape to get its text. It is simply "shp.Text". The characters object is more complexe and lets you do funny stuff with the text.