‘Query the Web catalog on the local system
objQuery.Catalog = “web”
‘Query the System catalog on the local system
objQuery.Catalog = “system”
‘Query the Web catalog on the computer www.somehost.com
objQuery.Catalog = “query://www.somehost.com/web”
If i<>0 Then
Messagebox "共搜索到符合条件的文档"+Str(i)+"个",0+64,"提示信息:"
Set doc=view.getfirstdocument
While Not(doc Is Nothing)
Set item=doc.getfirstitem("SelectUserName")
Call item.appendtotextlist(session.username)
Call doc.save(True,True)
Set doc=view.getnextdocument(doc)
Wend
servername=uidoc.fieldgettext("servername")
databasename=uidoc.fieldgettext("databasename")
'nvgQueryResult导航器默认显示的视图为VWSelect,该视图显示搜索结果
Call ws.opendatabase(servername,databasename,"nvgQueryResult")
doc1.saveoptions="0"
Call doc1.save(True,False)
Call uidoc.close
Call view.clear
Exit Sub
Else
Messagebox "没有满足条件的记录!",0+48,"提示信息:"
End If