/ Forums / Advansys Formativ / Creating Solutions with Formativ / Recurring Appointment for a whole day (Autodate)

  • Creator
    Topic
  • #4313
    rfaude
    Participant

      Hi,

      is there a way to create recurring appointments (autodate). The time for the appointment should be the whole day. Not with start and endtime! And at least it shoud be shown as tentative.

      My code at the moment . . .



      Set objAppt = GroupWise.Account.Calendar.Messages.Add("GW.MESSAGE.APPOINTMENT", fgwPersonal)

      With objAppt
      .OnCalendar = TRUE
      .Priority = fgwNormal
      .FromText = ""
      .Place = ""
      .StartDate = Date
      .EndDate = Date + 1
      .Duration = 24/24
      .Subject = "Birthday"
      .Private = TRUE
      .AlarmSet = TRUE
      .AlarmReminderMinutes = 900
      .BodyText.PlainText = "Happy birthday to you! Don't forget my present"
      End With

      Set objRecipient = Nothing
      Set objAppt = Nothing

      Thanks

      Ralf

    • Author
      Replies
    • #7788
      Support 3
      Participant

        Its a known GroupWise Object API limitation that you can not create the autodate appointments. However you can create all day appointments but the AllDay property only available in GroupWise 7.0 and later. The example below creates all day appointments for 3 years:

          
          for x = 0 to 2
            Set objAppt = GroupWise.Account.Calendar.Messages.Add("GW.MESSAGE.APPOINTMENT", fgwPersonal)
        
            With objAppt
              .OnCalendar = TRUE
              .Priority = fgwNormal
              .Place = "City"
        
              ' An AllDay appointment starts at midnight of the first day and ends at midnight of the next day.
              ' For example, the properties show up in the Object API StartDate as 23-June-2006 at 12:00:00 a.m. and in the
              ' EndDate as 24-June-2006 at 12:00:00 a.m. — GroupWise 7.0 and later
              .AllDay = true
        
              ' See the Visual Basic Scripting help for the DateAdd function
              .StartDate = DateAdd("yyyy", x, date)
        
              .Subject = "Birthday"
              .Private = TRUE
              .AlarmSet = TRUE
              .AlarmReminderMinutes = 900
              .BodyText.PlainText = "Happy birthday to you! Don't forget my present"
            End With
        
            Set objAppt = Nothing
          next
        

        Hope this helps.

        Regards,
        Advansys Support

        #7787
        rfaude
        Participant

          Hi,

          > Its a known GroupWise Object API limitation that you can not create the autodate appointments.
          Some days you can not win and at some days you lose . . .

          Yes the workaround with the loop helps to insert the appointment for more then one day, but if you want to change or delete the appointment you have to do this on each appointment 🙁

          Perfect explanation

          ‘ An AllDay appointment starts at midnight of the first day and ends at midnight of the next day.
          ‘ For example, the properties show up in the Object API StartDate as 23-June-2006 at 12:00:00 a.m. and in the
          ‘ EndDate as 24-June-2006 at 12:00:00 a.m. — GroupWise 7.0 and later

          Thanks

          Ralf

          PS: All the time the best assistance from a company . . .

          #7786
          Support 3
          Participant

            Thanks for your feedback. If you have any further questions, please do not hesitate to contact us.

            Regards,
            Advansys Support

          Viewing 3 replies - 1 through 3 (of 3 total)
          • You must be logged in to reply to this topic.