【问题标题】:Lotus notes Button Script for Multiple Calendar entry用于多个日历条目的 Lotus notes 按钮脚本
【发布时间】:2013-03-26 12:43:14
【问题描述】:

这是我的脚本。我想在这个脚本中有 2 个日期和时间,所以当有人点击按钮时,收件人日历中应该有两个条目

我非常感谢在这个问题上的任何帮助。

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

【问题讨论】:

  • 你有什么问题?现在运行这个脚本会发生什么?
  • 脚本运行良好..一旦他们点击按钮,无论脚本中提到的日期和时间进入他们的日历。我想要的是在脚本中添加两个不同的日期,并且当点击它时它应该在他们的日历中创建两个不同的条目。
  • 您是在谈论创建重复约会吗?即,相同的时间和相同的细节,但在两个不同的日子?
  • 是的,你是对的,但在两个不同的日子里日期和时间不同。即使重复约会相同的日期和时间,细节没问题这对我来说很好。但我想要日历中的两个条目。感谢您检查此内容,非常感谢您的帮助,谢谢。

标签: lotus-notes lotus-domino lotus lotusscript lotus-formula


【解决方案1】:

IBM 已发布 Lotus Notes 日历约会的架构 here。如果您想创建两天的重复约会,但在每天的同一时间,然后从第 12 页开始。有很多选项,但我认为您可能希望设置 Repeats="1 ", RepeatUnit="C" 并将 RepeatCustom = 设置为包含两个日期的数组。

【讨论】:

    【解决方案2】:

    IBM 将已发布的 Lotus Notes C&S Schema 文档移至 here。上面找到的另一个链接是未更新的先前版本。

    除了添加 ORGRepeat 值“1”之外,要使条目重复,您需要有 3 个并行的值列表:StartDateTime、EndDateTime 和 RepeatInstanceDates。最初,StartDateTime 和 RepeatInstanceDates 项将包含相同的值,因此您可以在创建后简单地使用该值。

    CalendarDateTime 项还需要具有与上述列表相同数量的值,以便该条目将显示在日历上的正确日期/时间。

    脚本的一个潜在问题是它会使用用户的时区作为时间。因此,如果任何用户在另一个时区并且他们点击它,条目将被放置在错误的时间。您可以通过将 3 个字符的时区标识符放在值的末尾来解决此问题(例如“03/26/2013 04:00:00 PM EDT”)

    您可能还想查看我找到的按钮脚本here,以了解如何执行此操作的另一个示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多