Hi,

I want my application to copy documents from a library to my file system. I get an exception with a message "Unknown error occurred"

Here is my code:
Code:
Dim docIterator As DocumentIterator = library.Documents.CreateDocumentIterator
        Dim doc As Document = Nothing
        Dim docVersions As DocumentVersions
        Dim docVersion As DocumentVersion
For docCounter = docStart To docEnd
   MsgBox("Getting the document...")
                'get the document
                doc = docIterator.Next
                MsgBox("Got the document " & doc.Subject)
                docVersions = doc.DocumentVersions
                MsgBox("Got the document versions " & docVersions.Count)
                For docVersionCounter = 1 To docVersions.Count
                    docVersion = docVersions.Item(docVersionCounter)
                    Try
                    docVersion.CopyOut("C:\" & docVersion.VersionNumber & "." & docVersion.OriginalFileType)
                    'docVersion.CopyOut("test")
                    MsgBox("document:  " & docVersion.VersionNumber)
                    Catch ex As Exception
                    MsgBox("inside version loop: " & ex.Message)
                     End Try

                Next
Next
Another module has already performed the log in and was successful
Code:
Try
            gwApp = New GroupwareTypeLibrary.Application5
            'frmSplash.Show()
            'frmSplash.Refresh()
            gwAcc = gwApp.Login(groupWiseUserName, "", groupWisePassWord, 1)
            'frmSplash.Close()
        Catch ex As Exception
            MessageBox.Show(ex.Message & " Application will terminate.", "GroupWise Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            'Me.Close()
            System.Windows.Forms.Application.ExitThread()
        End Try
Thanks