Home > Domino Tips > Developer > Agent > Document list of your Domino.doc library
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

AGENT

Document list of your Domino.doc library


Oya Kubilay
01.20.2004
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


This agent works for selected documents in the "main view" in the Dom.doc library database. It puts a list of all documents of chosen cabinets (chosen by selecting documents from the view) into a MS Excel workbook. It puts each list of a cabinet into a different worksheet and gives the cabinet's name to a workbook.

Code

Sub Initialize
 Dim s As New NotesSession
 Dim dblib As NotesDatabase
 Dim vlib As NotesView 
 Dim doclib As notesdocument  
 Dim Dbbinder As NotesDatabase
 Dim vbinder As NotesView
 Dim docbinder As notesdocument 
 Dim db As NotesDatabase
 Dim v As NotesView
 Dim doc As notesdocument 
 Dim tarih As notesdatetime
 Dim excelapp As Variant
 ' My MS Excel is XP, therefore this 
parameter is 10
 Set excelapp=createobject
("Excel.Application.10")
 excelapp.Visible = True
 Dim excelwb As Variant
 Dim excelws As Variant
 Set excelwb=excelapp.workbooks.add()  
 
 Set dblib =s.currentdatabase
 Dim collection As 
NotesDocumentCollection
 Set collection = dblib.
UnprocessedDocuments
 Set doclib = collection.
GetFirstDocument()
 
 Do
  Set dbbinder=s.getdatabase
(dblib.server,doclib.dbname(0))
  Set vbinder=dbbinder.getview
("(ServerProfileList)")
  Set docbinder=vbinder.getfirstdocument
  
  Set excelws=excelwb.worksheets.Add()
  excelws.Name=Left(dbbinder.Title,31)
  Excelws.range("A1").value="Binder"
  Excelws.range("B1").value="Doc Name"
  Excelws.range("C1").value="Version"
  Excelws.range("D1").value=
"Last Modified Date"
  i=2
  dbname=docbinder.currDocDBPath(0)
  Set db =s.getdatabase
(dblib.Server,dbname)
  Set v=db.GetView("(DocsByBinderID)")
  Set doc=v.getfirstdocument
  While Not(doc Is Nothing)
   Excelws.range("A" & Cstr(i)).
value=doc.Doctype(0)
   Excelws.range("B" & Cstr(i)).
value=doc.title(0)
   If doc.format(0)="Link" Then
    vers=""
   Else
    vers=Cstr(doc.version(0)) & "." 
& Cstr(doc.draft(0))
   End If
   Excelws.range("C" & Cstr(i)).
value=vers
   Set tarih = New NotesDateTime
( doc.LastModDate(0) )
   Excelws.range("D" & Cstr(i)).
value=tarih.dateonly
   i=i+1
   Set doc=v.getnextdocument(doc)
  Wend
  Call Excelws.range("A1:D" & 
Cstr(i-1)).Autoformat(True)
  Set doclib = collection.
GetNextDocument(doclib)
 Loop Until doclib Is Nothing
End Sub

Do you have comments on this tip? Let us know.


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Agent
Quickly scan all databases on a Lotus Domino server
Run or restart Notes/Domino agents via text messages
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)
How to export data from a Lotus Notes database to a CSV file
Enable or disable scheduled agents without opening the Lotus Notes database design
Creating custom views in Lotus Notes databases

Lotus Notes Domino Agents
Quickly scan all databases on a Lotus Domino server
How the Agent Profiler tool improves Notes/Domino performance
Run or restart Notes/Domino agents via text messages
Calculating results for a column in a Lotus Notes view
Approve Lotus Notes documents using a BlackBerry mobile device
LotusScript agent indexes Lotus Notes/Domino databases
Top 10 Lotus Notes/Domino coding and development tips of 2008
Open documents in Lotus Notes from the Web without a UNID
Fix and update Lotus Notes documents with limited access
Verify scheduled agent status with Domino Extensible Language (DXL)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts