I wish to use it in a visio applicaton and not a web application.
Does anyone have any suggestion for me to address adding a image placeholder
and to indicate where the stencil is to go to which placeholder ??
All help is deeply appreciated.
Thank You,
G
Option Explicit
Private Sub Document_ShapeAdded(ByVal Shape As IVShape)
Dim aspr As Double
If Shape.Type = visTypeForeignObject Then
aspr = Shape.Cells("Height") / Shape.Cells("Width")
Shape.Cells("PinX").FormulaForceU = "GUARD(ThePage!PageWidth*0.5)"
Shape.Cells("PinY").FormulaForceU = "GUARD(ThePage!PageHeight*0.5)"
Shape.Cells("Width").FormulaForceU = "GUARD(ThePage!PageWidth)-1"
Shape.Cells("Height").FormulaForceU = "GUARD(Width*" & aspr & ")"
End If
End Sub
>I would like to have the ability to place 4 to 6 image placeholders on a
>8.5x11 Visio page. I would like the ability to select which stencil image
>to go to the desired image placeholder.
In Visio the shape is the shape is the shape is the shape. There is no such thing as
"stencil image", I think you might mean "shape image" but that doesn't exist either, the
image is just the shape itself.
However, you could do this:
Put your 4 to 6 shapes on a page (make them different shapes from, say, the flowchart
stencil.
When you know what actual shape you want to use then just replace one with the other. If
you want to write some simple VBA code then it is just a matter of placing the new shape
at the coordinates of the old one and deleting the old one.
--
Regards, Paul Herber, Sandrila Ltd.
DFD/SSADM/ERD for Visio http://www.sandrila.co.uk/visio-dfd/