人のソースを参考に、自分で書いたものをネットに退避。
これを使ってなんかトラブってもサポートいたしかねる。
・タスクが書き出されてしまう点
・会議しか書き出されない点
という問題があるのはいづれ直す。
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim col As NotesDocumentCollection
Dim outputFile As Integer
Dim startDate As NotesDateTime, endDate As NotesDateTime
Sub Initialize
Dim session As New NotesSession
Set db = session.CurrentDatabase
Dim dateTime As New NotesDateTime(Today)
input@ = Cint(Inputbox$("何日前に作成されたスケジュールを取り込みますか?", , 1))
Msgbox Today-input@ & "以降に作成・変更した予定を書き出します。"
Set dateTime = New NotesDateTime( Today-input@)
Set col = db.Search("@IsAvailable(CalendarDateTime)",dateTime, 0)
counter=0
outputFile = Freefile()
Open "C:\NotesCal.csv" For Output As outputFile
Print #outputFile, |"| & "Subject" & |","| & "Start Date" & |","| & _
"Start Time" & |","| & "End Date" & |","| & "End Time" & |","| & _
"All day event" & |","| & "Description" & |"|
Set doc = col.GetFirstDocument
While Not (doc Is Nothing)
counter=counter+1
Set startDate = New NotesDateTime(doc.StartDateTime(0))
Set endDate = New NotesDateTime(doc.EndDateTime(0))
Print #outputFile, |"| & doc.Subject(0) & |","| & _
startDate.DateOnly & |","| & startDate.TimeOnly & |","| & _
endDate.DateOnly & |","| & endDate.TimeOnly & _
|","| & "false" & |",""|
Set doc = col.GetNextDocument(doc)
Wend
Msgbox counter & "個の予定を書き出しました。"
Close outputFile
End Sub
0 件のコメント:
コメントを投稿