Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Shape-Zugriff

Da ein Shape sowohl auf dem Zeichenblatt als auch als Master-Shape in einer Schablone liegen kann, muss genau geklärt werden, auf welches Shape an welchem Ort zugegriffen wird.

Master-Shapes in einer Schablone

Wird auf eine Schablone zugegriffen, kann man auch auf dortige Master-Shapes zugreifen. Die Anweisung

Documents(i).Masters.GetNames

übergibt die Namen aller Master-Shapes an ein Array, wenn es sich bei Documents(i) um eine Schablone handelt. Das folgende Beispiel durchläuft alle Dateien, überprüft, ob es sich um Schablonen handelt, und zeigt deren Master-Shape-Namen an:

Sub MastersAnzeigen()
   Dim intMaster As Integer
   Dim intDokumente As Integer
   Dim strMasternames() As String
   Dim strAusgabe As String

   For intDokumente = 1 To Documents.Count
      If Right(Lcase(Documents(intDokumente).Name), 3) = _
         "vss" Then
         Documents(intDokumente).Masters.GetNames _
            strMasternames

         For intMaster = LBound(strMasternames) To _
            UBound(strMasternames)
            strAusgabe = strAusgabe & ", " & _
               strMasternames(intMaster)
         Next

         MsgBox Documents(intDokumente).Name & vbCr & _
            "(" & Documents(intDokumente).AlternateNames & ")" & vbCr & _
            " enthält folgende Master-Shapes:" & _
            vbCr & Right(strAus....

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial