Newbie Macro in VISIO 2003

L

Luke Williams

Hello,

I have created a macro to type some text in my diagram. After finishing
recording my macro, I execute it in a form. It works but the text is created
in the initial form from which I recorded the macro.... In Excel, there was
a way to specify if the macro was relative or not. How can you execute the
macro in the form I select?

Thanks so much,

L.
 
M

Mark Nelson [MS]

Text is placed in a shape using the Shape.Text property. You need to get a
reference to a different shape if you want the text assigned somewhere else.
One possibility is to use the shape currently selected. This code would do
that.

If ActiveWindow.Selection.Count > 0 Then
ActiveWindow.Selection.Item(1).Text = "Text I want to set"
End If
 

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