Type Mismatch

I’m getting type mismatch on the copyDoc in → Call doc.CopyAllItems(copyDoc, True)

Here is my code. I can’t seem to find what’s wrong.

Sub MySubName(dc As NotesDocumentCollection)

Dim s As New NotesSession

Dim uiws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim v1 As NotesView

Dim dc1 As NotesDocumentCollection

Dim doc As NotesDocument, doc1 As NotesDocument



Set db = s.CurrentDatabase

Set doc = dc.GetFirstDocument



Do While Not doc Is Nothing

	Set copyDoc = New NotesDocument(db)

	Call doc.CopyAllItems(copyDoc, True)

	Set doc = dc.GetNextDocument(doc)

Loop

End Sub

Subject: Type Mismatch

You haven’t declared copydoc (you have declared doc1 which you then don’t use so I guess you meant to use that instead)

Dan

Subject: RE: Type Mismatch

And don’t forget to save copydoc :wink:

Subject: RE: Type Mismatch

Thanks everyone…once i declare copyDoc, there isn’t any “Type Mismatch” anymore.