How to add Response Document in Folder from Putinfolder method

Hi i have problem when ever i want to add response document in folder from put in folder method

Sub Initialize

Dim workspace As New NotesUIWorkspace

Dim session As New NotesSession	

Set db = session.CurrentDatabase	

Set view=db.GetView("(AllToursinSeries)")	

Set collection = db.UnprocessedDocuments

Set Doc = Collection.GetFirstDocument

If Not Doc Is Nothing Then		

	SeriesKey$=Doc.SeriesLinkNumber(0)		

	Set Mastrcoll = view.GetAllDocumentsByKey(SeriesKey$)		

	If MastrColl.Count > 0 Then

		Set TourDoc=Mastrcoll.GetFirstDocument	

		While Not TourDoc Is Nothing

			Set SegColl = TourDoc.Responses

			Set SegDoc=SegColl.GetFirstDocument	

			While Not SegDoc Is Nothing

				If SegDoc.Form(0)="Segment" Then

					Set BkgColl = SegDoc.Responses

					Set BookDoc=BkgColl.GetFirstDocument		

					While Not BookDoc Is Nothing

						Call BookDoc.PutInFolder("ALLBOOKING")	

						Set BookDoc=BkgColl .GetNextDocument(BookDoc)

					Wend

				End If

				Set SegDoc=SegColl.GetNextDocument(SegDoc)

			Wend				

			Set TourDoc=Mastrcoll.GetNextDocument(TourDoc)

		Wend

	End If

End If	

Exit Sub

errH:

Msgbox "Error in line " & Cstr(Erl) & " and error is: " & Error

Exit Sub

End Sub

in this code when ever i want to add Bookdoc in Folder it shows error Notes error .

if any one know this pls help me

Subject: RE: How to add Response Document in Folder from Putinfolder method

If the folder option is set to display documents in a hierarchy (which is the default), then you can’t add a response document to a folder unless its parent is also in the folder.

If the above does not solve your problem, you might read the C R I S P Y document and consider its recommendations.

  • Andre Guirard, IBM/Lotus Development

Useful blog: Best Practice Makes Perfect