|
pdmworks search via api
the api help doesn't even mention search, but the search methods are exposed -but i am doing something wrong with declarations - can anyone help? the follwing does not run because of the declaratino of search criteria and search options
dim opt as pdmworks.ipdmwsearchoptions
dim crit as pdmworks.pdmwsearchcriteria
dim searchresults as pdmworks.pdmwsearchresults
dim r as pdmworks.pdmwsearchresult
dim szname as string
szname = listbox1.selecteditem.tostring
opt = pdmworks.pdmwsearchoptions<----- this is not valid
crit = opt.searchcriteria
crit.addcriteria(pdmworks.pdmwandor.pdmwand, pdmworks.pdmwpropertytype.pdmwowner, "owner", pdmworks.pdmwconditiontype.pdmwcontains, szname)
with opt
.ignorecase = true
.ignorelinks = true
.includehiddendocuments = true
.searchconfigspecificproperties = false
.searchonlychildrenof = ""
end with
searchresults = pdm.search(opt)
for each r in searchresults
msgbox(r.name)
next
from searchcriteria example
set opt = connection.getsearchoptionsobject
quick |
|