2 Replies Latest reply on Mar 30, 2015 10:51 AM by Chris Champions

    Narrow search to a project

    Chris Champions

      I used this sub (from Jerry Winters) to search files from the whole Vault, how can I narrow the search to  a project

      Thanks

       

       

       

      1. Sub QueryTheVaultA()
      
      2. Dim myPDMConn As New PDMWConnection
      
      3. Dim myPDMWSO As PDMWSearchOptions
      
      4. Dim myPDMWSRs As PDMWSearchResults
      
      5. Dim myPDMWSR As PDMWSearchResult
      
      6. myPDMConn.Login "pdmwadmin", "pdmwadmin", "localhost"
      
      7. myPDMConn.Refresh
      
      8. Set myPDMWSO = myPDMConn.GetSearchOptionsObject
      
      9. myPDMWSO.SearchCriteria.AddCriteria pdmwAnd, _
      
      pdmwDescription, _
      
      "", _
      
      pdmwContains, _
      
      "sea"
      
      10. Set myPDMWSRs = myPDMConn.Search(myPDMWSO)
      
      11. For Each myPDMWSR In myPDMWSRs
      
      12. If Not myPDMWSR.Document Is Nothing Then
      
      13. MsgBox myPDMWSR.Description & vbCr & myPDMWSR.Name
      
      14. End If
      
      15. Next
      
      16. myPDMConn.Logout
      
      17. End Sub