這是我的腳本。我想在這個腳本中有兩個日期和時間,所以當有人點擊按鈕應該有兩個條目在收件日曆中蓮花筆記多個日曆條目的按鈕腳本
我真的很感謝在這個問題上的任何幫助。
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim subject As String
Dim maildoc As NotesDocument
Dim rtitem As NotesRichTextItem
Set db = s.CurrentDatabase
Set doc = New NotesDocument(s.CurrentDatabase)
Set maildoc = New NotesDocument(s.CurrentDatabase)
Set ritem = New NotesRichTextItem(maildoc, "Body")
'Modify Subject, Location, Start Day and Time, End Day and Time before sending!!
'#########################################################################
doc.subject = "test"
doc.location = "bangalore"
Set startdatetime = New NotesDateTime("03/26/2013 04:00:00 PM")
Set enddatetime = New NotesDateTime("03/24/2008 05:00:00 PM")
'#########################################################################
doc.From = s.UserName
doc.Form = "Appointment"
doc.AppointmentType = "0"
doc.Chair = s.UserName
doc.StartDateTime = startdatetime.LSLocalTime
doc.EndDateTime = enddatetime.LSLocalTime
doc.CalendarDateTime = startdatetime.LSLocalTime
doc.TimeRange = Timevalue(doc.startdatetime(0)) & "-" & Timevalue(doc.enddatetime(0))
doc.ExcludefromView = "D"
Call doc.ReplaceItemValue("_ViewIcon", 160)
Call doc.AppendItemValue("$BusyName", s.UserName)
Call doc.AppendItemValue("$BusyPriority", "1")
Call doc.AppendItemValue("$PublicAccess", "1")
Call doc.save(True,True)
Print "An entry for this event was successfully added to your calendar and an e-mail confirmation was sent."
Msgbox "Calendar successfully updated and e-mail confirmation sent.", 64, "Success"
'Send e-mail confirmation
maildoc.Form = "Memo"
'Modify Subject and Send to
'############################################################################
maildoc.Subject = "test to send multiple emails"
Dim recip(2) As Variant
recip(0) = ""
recip(1) = ""
maildoc.sendto = recip
'############################################################################
Call maildoc.Send(False)
End Sub
你的問題是什麼?當你現在運行這個腳本時會發生什麼? – 2013-03-26 13:15:45
那麼腳本工作得很好..一旦他們點擊按鈕,無論日期和時間腳本中提到他們的日曆。我想要的是在腳本中添加兩個不同的日期,並且當點擊它時,它應該在其日曆中創建兩個不同的條目。 – 2013-03-26 13:21:51
您是否在談論創建重複預約?即,同一時間和相同的細節,但在兩個不同的日子? – 2013-03-26 17:48:59