Type mismatch in document save . .

Hi all,

We have a: “type mismatch” Error in the line:

Call document.save (true,true)

The document is a NotesDocument

¿Why is this could be happen? ¿What could be the solution for this error?

Thanks in advance for all colaborations.

JK.

Subject: Type mismatch in document save . . .

post your entire code please

Subject: RE: Type mismatch in document save . . .

Sub MonPdctSaveAction Dim doc As Notesdocument

Dim docInd As NotesDocument

Dim i As Integer

Dim ttlInd As String, cdAct As String, contxt As String		



Select Case doc.action(0)

	

Case "Delete"		

	For i=0 To Ubound(doc.indicsDelete)			

		id=doc.indicsDelete(i)

		Set docInd = db.GetDocumentByUNID(id)

		If Not docInd Is Nothing Then _

		docInd.remove(True)			

	Next i	

	doc.indicsDelete=""		

End Select	



If doc.indics(0)="" Then _ 

Exit Sub



n=Ubound(doc.indics)	

For i=n To 0 Step -1

	id=Field(doc.indics(i),0)	

	Set docInd = db.GetDocumentByUNID(id)

	If Not docInd Is Nothing Then			

		If cdAct<>docInd.cdAct(0) Then 

			cdAct=docInd.cdAct(0)

			contxt=doc.indics(i)

		End If				

		docInd.index=doc.indics(i)

		docInd.index=Evaluate("@Implode(@Trim(@Explode(index;' '));' ')",docInd)			

		docInd.unit=doc.indics(i)

		docInd.basicProduct=doc.indics(i)

		docInd.period=doc.indics(i)

		docInd.limitDatePeriod=doc.indics(i)

		docInd.Vigency=doc.indics(i)

		docInd.limitDateVigency=doc.indics(i)

		docInd.actualResult=doc.indics(i)

		docInd.vigencyResult=doc.indics(i)

		docInd.signal=doc.indics(i)

		docInd.observs=doc.indics(i)

		docInd.contxt=contxt

		acumResult=docInd.actualResult(0) + docInd.beforeAcum(0)

		docInd.acumResult=acumResult

		Call docInd.Save(True,True)

	End If

Next i

End Sub

Subject: RE: Type mismatch in document save . . .

do you know where in the script it erroring out? For example, are you getting the type mismatch error on the first doc it attempts to process or somewhere later in the script? Have you put your script through the debugger?