K
ker_01
I have an orgchart, and I'm bringing in some .emf files and placing them in
the orgchart behind the existing orgchart shapes. This is all done in code.
Normally I have to rebuild the orgcharts because they change each month,
then add shapes to the new orgchart.
In this case, I need to update the same orgchart by replacing those added
shapes with revised ones, so I'm looking for the easiest way to loop through
every shape on every page, and delete anything that was imported as an .emf
file (imported using the following code, if it matters):
With Application.ActiveWindow
Set vsoShape = .Page.Import(MyFileName2)
On Error GoTo 0
vsoShape.Cells("PinX").FormulaU = b1
vsoShape.Cells("PinY").FormulaU = LowerPinY
vsoShape.Cells("Height").FormulaU = HalfHeight
vsoShape.Cells("Width").FormulaU = b4
vsoShape.SendToBack
End With
I'm good with VBA in Excel, but I don't know much about the Visio object
model, so I'm not sure how to actually determine if a selected shape is one
of these .emf images, vs. and org chart shape vs. a connector line, etc.
Any suggestions?
Thank you!
Keith
the orgchart behind the existing orgchart shapes. This is all done in code.
Normally I have to rebuild the orgcharts because they change each month,
then add shapes to the new orgchart.
In this case, I need to update the same orgchart by replacing those added
shapes with revised ones, so I'm looking for the easiest way to loop through
every shape on every page, and delete anything that was imported as an .emf
file (imported using the following code, if it matters):
With Application.ActiveWindow
Set vsoShape = .Page.Import(MyFileName2)
On Error GoTo 0
vsoShape.Cells("PinX").FormulaU = b1
vsoShape.Cells("PinY").FormulaU = LowerPinY
vsoShape.Cells("Height").FormulaU = HalfHeight
vsoShape.Cells("Width").FormulaU = b4
vsoShape.SendToBack
End With
I'm good with VBA in Excel, but I don't know much about the Visio object
model, so I'm not sure how to actually determine if a selected shape is one
of these .emf images, vs. and org chart shape vs. a connector line, etc.
Any suggestions?
Thank you!
Keith