There is no way to know what document a shape originated from. Technically
all shapes originate from the local document. When you drag a shape from a
stencil into the document, Visio first copies the shape master to the local
document. Then it creates an instance of that master on the page.
You can use the Shape.Master property to find out what master an instance
comes from, but this is a reference to the master in the local document.
--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.