About reading TEXT property in the Group of Shape.

P

Park Kyu Chol

during i have made VBA Coding, i have one problem.

In Visio Stencil, there are Stenchil which is configured with group of
shape.

For this case, i try to find object in page with *.pages.count object. but
VBA cannot find object.

so i have used trick like below.

at first, i have open ID Information of group object, and set name of ID
with predefined name.

after that, with below code, i try to read TEXT property.

For i = 0 To 1000
Select Case ThisDocument.Pages(NoPage).Shapes.ItemFromID(i).Name
Case "DWGNAME"
ID_DWGTitle = i
TXT_DWGTitle =
ThisDocument.Pages(NoPage).Shapes.ItemFromID(i).Text
...
...

...
end select
next i


output is only "?".

this result is not all group shape. it is only 1 ~ 3 item.

if i have type it again with other charactor, VBA Code can read some group
shape.

why this is happened? and how to solve this?

please advise me...

Thank you very much.
 
J

JuneTheSecond

If the name of the shape , "DWGNAME", is added to the top shape of the group.
TXT_DWGTitle = ThisDocument.Pages(NoPage).Shapes("DWGNAME").Text
might read the text. If on the sub-shape in the group, you might search the
name in syb- shapes like,,,
For all i and j,,,,
If ThisDocument.Pages(NoPage).Shapes(i).shapes(j).Name ="DWGNAME" then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top