Attach Ink to Shape Event

J

John

Hi there,

Can anyone recommend the best way to attach Ink text to another shape
automatically? I'm assuming I need some kind of event to capture a new ink
instance ("drop"?) and then assign its PinXY to the shape that has just been
written over the top of? Are there any inbuilt events or would I need to
write a new class/listener?

All pointer gratefully accepted!

Thanks

John
 
J

JuneTheSecond

I doubt that my idea is complete, but the ShapeAdded events and some
conditions might enable them. For the Ink the type of the shape is 4, and the
forign type may be 64, (I am not sure 64.) . For example,
Private WithEvents myPage As Visio.Page
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Set myPage = ActivePage
End Sub
Private Sub myPage_ShapeAdded(ByVal Shp As IVShape)
Dim MyText As String
Dim MyShape As Shape
If Shp.Type = 4 And Shp.ForeignType = 64 Then
MyText = Shp.Text
MsgBox "Ink added. Text is " & MyText
End If
For Each MyShape In ActivePage.Shapes
MyShape.Text = MyText
Next
End Sub
 

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