how can you print thumbnail pictures of visio shapes?

C

cococc

would like to print catalog of shapes so I don't have to open everyone to
look for a shape.
 
J

JuneTheSecond

I've tested to aytomate my manual operatios, but failed in vain.
Sub test()
Dim mst As Visio.Master
Dim mywin As Visio.Window

For Each mst In ThisDocument.Masters
Set mywin = mst.OpenIconWindow
DoEvents
mywin.SelectAll
SendKeys "%E", True
SendKeys "^C", True
ActiveWindow.Activate

SendKeys "%E", True
SendKeys "^V", True
mywin.Close
DoEvents
Next
End Sub
 
C

Chris Roth [MVP]

Check out the Shape's Preview property in the Developer Reference. That
might do the trick. I haven't messed with it for a while, but I think that's
what you need.

--
Hope this helps,

Chris Roth
Visio MVP

More Visio shapes, articles, development info and pure diagramming fun at:
www.wanderkind.com/visio
 
J

JuneTheSecond

Thank you Chris.
Now it is.
Sub test()
Dim mst As Visio.Master
Dim myFolder As String
Dim mypic As stdole.StdPicture
Dim myshp As Visio.Shape
Dim I As Integer
myFolder = AnyFodlerNmameInString & "\"
For Each mst In ThisDocument.Masters
Set mypic = mst.Icon
stdole.SavePicture mst.Icon, myFolder & mst.Name & ".gif"
Set myshp = ActivePage.Import(myFolder & mst.Name & ".gif")
I = I + 1
myshp.Cells("PinX").FormulaU = 0.5 * I
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