Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How Can I Add A Placeholder For Stencil In Visio ?

181 views
Skip to first unread message

Gary

unread,
May 11, 2010, 4:36:04 PM5/11/10
to
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.

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

JuneTheSecond

unread,
May 12, 2010, 9:44:02 PM5/12/10
to
This is an example to place a picture on the page.
I hope it may help you as one of the tips.

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

Paul Herber

unread,
May 18, 2010, 8:10:29 AM5/18/10
to
On Tue, 11 May 2010 13:36:04 -0700, Gary <Ga...@discussions.microsoft.com> wrote:

>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/

0 new messages