저는 Lotus Notes 데이터베이스(Lotus Notes 메일 파일 아님!)를 어떤 형식으로든 내보내는 데 도움이 되는 무료 또는 저가의 도구를 찾고 있습니다. CSV/엑셀 등..
또한 데이터베이스에서 첨부 파일을 추출할 수 있어야 합니다. 모두 Word 문서입니다.
저는 DetachIt이라는 것을 찾았습니다. 하지만 라이센스 비용이 너무 높아 접근하기가 상당히 어렵습니다.
감사합니다!
답변1
다음은 Excel로 데이터를 내보내기 위해 몇 년 전에 작성한 무료 도구입니다. 엑셀 2.0으로 내보내기
또한 이메일에서 첨부 파일을 추출하는 코드를 작성했는데 이 코드를 다른 데이터베이스에서 작동하도록 조정할 수 있습니다.
(Declarations)
Dim sDir As String
Dim s As NotesSession
Dim w As NotesUIWorkspace
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Sub Initialize
Set s = New NotesSession
Set w = New NotesUIWorkspace
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Dim rtItem As NotesRichTextItem
Dim RTNames List As String
Dim DOCNames List As String
Dim itemCount As Integer
Dim sDefaultFolder As String
Dim x As Integer
Dim vtDir As Variant
Dim iCount As Integer
Dim j As Integer
Dim lngExportedCount As Long
Dim attachmentObject As Variant
x = Msgbox("This action will extract all
attachments from the " & Cstr
(dc.Count) & _
" document(s) you have selected,
and place them into the folder of your
choice." & _
Chr(10) & Chr(10) & "Would you like
to continue?", 32 + 4, "Export
Attachments")
If x <> 6 Then Exit Sub
sDefaultFolder = s.GetEnvironmentString
("LPP_ExportAttachments_DefaultFolder")
If sDefaultFolder = "" Then sDefaultFolder = "F:"
vtDir = w.SaveFileDialog( False, "Export
attachments to which folder?", "All
files|*.*", sDefaultFolder, "Choose
Folder and Click Save")
If Isempty(vtDir) Then Exit Sub
sDir = Strleftback(vtDir(0), "\")
Call s.SetEnvironmentVar
("LPP_ExportAttachments_DefaultFolder", sDir)
While Not (doc Is Nothing)
iCount = 0
itemCount = 0
lngExportedCount = 0
Erase RTNames
Erase DocNames
'Scan all items in document
Forall i In doc.Items
If i.Type = RICHTEXT Then
Set rtItem = doc.GetfirstItem(i.Name)
If Not Isempty(rtItem.EmbeddedObjects)
Then
RTNames(itemCount) = Cstr(i.Name)
itemCount = itemCount +1
End If
End If
End Forall
For j = 0 To itemCount-1
Set rtItem = Nothing
Set rtItem = doc.GetfirstItem(RTNames(j))
Forall Obj In rtItem.EmbeddedObjects
If ( Obj.Type = EMBED_ATTACHMENT )
Then
Call ExportAttachment(Obj)
Call Obj.Remove
Call doc.Save( False, True )
'creates conflict doc if conflict exists
End If
End Forall
Next
'Scan all items in document
Forall i In doc.Items
If i.Type = ATTACHMENT Then
DOCNames(lngExportedCount) =
i.Values(0)
lngExportedCount = lngExportedCount + 1
End If
End Forall
For j% = 0 To lngExportedCount-1
Set attachmentObject = Nothing
Set attachmentObject =
doc.GetAttachment(DOCNames(j%))
Call ExportAttachment(attachmentObject)
Call attachmentObject.Remove
Call doc.Save( False, True )
'creates conflict doc if conflict exists
Next
Set doc = dc.GetNextDocument(doc)
Wend
Msgbox "Export Complete.", 16, "Finished"
End Sub
Sub ExportAttachment(o As Variant)
Dim sAttachmentName As String
Dim sNum As String
Dim sTemp As String
sAttachmentName = sDir
& "\" & o.Source
While Not (Dir$(sAttachmentName, 0) = "")
sNum = Right
(Strleftback(sAttachmentName, "."), 2)
If Isnumeric(sNum) Then
sTemp = Strleftback(sAttachmentName, ".")
sTemp = Left(sTemp, Len(sTemp) - 2)
sAttachmentName = sTemp
& Format$(Cint(sNum) + 1, "##00") & _
"." & Strrightback(sAttachmentName, ".")
Else
sAttachmentName =
Strleftback(sAttachmentName, ".") & _
"01." & Strrightback(sAttachmentName, ".")
End If
Wend
Print "Exporting " & sAttachmentName
'Save the file
Call o.ExtractFile( sAttachmentName )
End Sub