Notes 添付ファイル
ノーツ移行に伴って添付ファイル一括書き出しを書いたのでメモ
Viewアクションから実行
文書IDごとにディレクトリを切って添付ファイルを保存
これですむといいな。
Sub Click(Source As Button) Dim session As New NotesSession Dim db As NotesDatabase Dim collection As NotesDocumentCollection Dim doc As NotesDocument Dim rtitem As Variant Dim itemname As Variant Dim item As NotesItem Dim object As NotesEmbeddedObject Set db = session.CurrentDatabase Set collection = db.UnprocessedDocuments For i = 1 To collection.Count Set doc = collection.GetNthDocument( i ) If doc.HasEmbedded Then Do While doc.HasItem( "$FILE" ) Set item = doc.GetFirstItem( "$FILE" ) If item.Type = ATTACHMENT Then folderpath = "c:\temp" & "\" & doc.universalid If Dir(folderpath,16)="" Then Mkdir folderpath End If itemname = doc.GetItemValue( "$FILE" ) Set object = doc.GetAttachment( itemname(0) ) Call object.ExtractFile( folderpath & "\" & itemname(0)) End If Call item.Remove Loop End If Next End Sub
関連記事:
- Notes 添付ファイル その2
- GMail Backup でバックアップ
- Vim インストール
- Notes/Ruby フィールドリスト作成
- MacbookAirを買ったので、設定とかインストールしたアプリとかまとめ。
Additional comments powered byBackType
