Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


pavan kumar penmetsa 1.Aug.11 02:52 AM a Web browser
Domino Designer 6.5.5 All Platforms


I have written the following code ina action button in a view to export selected documents to excel

the code is as below

Sub Click(Source As Button)
Dim s As New notessession
Dim db As notesdatabase
Set db= s.currentdatabase
Dim uiw As New NotesUIWorkspace
Dim Doc As NotesDocument
Dim cview As NotesView
Dim doccol As NotesDocumentCollection
Dim tempdoc As notesdocument
Dim ws As New NotesUIWorkspace

Set uiv = uiw.currentview
currentviewname = uiv.viewname
Set cview = db.GetView(currentviewname)
cview.AutoUpdate=False

If cview Is Nothing Then
Messagebox "Could not open the view. """ & currentviewname & """"
Exit Sub
End If

Set doccol = db.unprocesseddocuments

If doccol.count >0 Then
resp = Messagebox("Do you want to export only the " & _
"selected " & doccol.count & " documents?", 36, "Selected only?" )
Else
Messagebox "Exporting all Documents."
End If

Dim xlApp As Variant
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False
xlApp.Workbooks.Add
xlApp.displayAlerts=False

hcolmn=1
Forall c In cview.Columns
xlApp.cells(1,hcolmn) = c.title
hcolmn=hcolmn+1
End Forall

row=2

If resp=6 Then
Dim seldoc As notesdocument
Set seldoc = doccol.GetFirstDocument
While Not seldoc Is Nothing
If resp=6 Then
Set Doc = cview.getnextdocument(seldoc) '' i'm getting the mentioned here
If Doc Is Nothing Then
Set Doc = cview.getprevdocument(seldoc)
If Doc Is Nothing Then
Print " >1 doc should be selected"
End
Else
Set Doc = cview.getnextdocument(Doc)
End If
Else
Set Doc = cview.getprevdocument(Doc)
End If
End If
For colmn = 0 To Ubound(cview.Columns)
xlApp.cells(row,colmn+1) = Doc.columnvalues(colmn)
Next
row=row+1
Set seldoc = doccol.GetNextDocument(seldoc)
Wend
Else
Set Doc = cview.GetFirstDocument
While Not Doc Is Nothing
For colmn = 0 To Ubound(cview.Columns)
xlApp.cells(row,colmn+1) = Doc.columnvalues(colmn)
Next
row=row+1
Set Doc = cview.GetNextDocument(Doc)
Wend
End If

location

xlApp.save


End Sub

when i'm clicking the button after selecting some documents in the view its giving the below error

Set Doc = cview.getnextdocument(seldoc) giving the error : index entry has too many levels(view name)

I'm not getting any idea why it is giving that error.
Please help me how to avoid this error.

Thanks for the help

Regards,
Pavan








  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow