i've a external process which adds a lot of shapes to a Publisher page. Sadly some of the shapes have been placed outside of the page.
This shapes are not in the Shapes collection of that page. Anybody know where can I get them?
Here a sample code that replicate the problem:
Sub main()
Dim oPage As Page
Dim oTable As Table
Dim oBox As Shape
Dim oLine As Shape
Set oPage = ActiveDocument.Pages(1)
Set oBox = oPage.Shapes.AddTable(2, 1, -150, 50, 120, 30, False)
oBox.Name = "Pepe"
Set oBox = oPage.Shapes.AddTable(2, 1, 350, 150, 120, 30, False)
oBox.Name = "Pepa"
Set oLine = oPage.Shapes.AddConnector(msoConnectorElbow, 0, 0, 100, 100)
With oLine.ConnectorFormat
.BeginConnect oPage.Shapes.Item("Pepe"), 1 'here are the error!!!
.EndConnect oPage.Shapes.Item("Pepa"), 1
End With
End Sub
What I want is to get the Shapes.Item("Pepe") even when is not in the page (Left -150). Where are the shapes that are not in the page?
Thanks in advance.
Angel.