? for Stan Rogers/Bill Ernst

Your names were given to me by Bob Barnes. He told me if anybody could answer my ? you guys could.

I’m developing an app in MS Access that needs to create a Calendar Entry (Reminder) in Lotus Notes R6. Create the document wasn’t difficult, but I’m having problems saving the document into the calendar. When I use ‘Call doc.Save(False, False, False)’ the document is saved into the Drafts Folder.

In addition, the resulting document also needs to be saved to another users calendar. I can access the other user’s file, but I cannot save the document to their file.

Any help you guys can give will be greatly appreciated.

Subject: ? for Stan Rogers/Bill Ernst

Well, I’m not either of those guys, sorry. But setting the field “ExcludeFromView” to “D” should help (this field is one of the items that drives whether a calendar document is shown in the “Drafts” view of a mailfile or not).

HTH

Subject: RE: ? for Stan Rogers/Bill Ernst

Thanks for your post Ben. I tried to set the “ExcludeFromView” field to “D”. But when I do so, it does not save the document at all. Like I just told David, I don’t know a whole lot about Lotus. I am primarily an Access and VB developer.

Subject: RE: ? for Stan Rogers/Bill Ernst

Setting that won’t prevent the saving of the document, you just can’t see it. You may need to set some other attributes in tandem with this one – look at the selection criteria of the ($Drafts) view in the ND6 mail file design for more clues.

HTH

Subject: ? for Stan Rogers/Bill Ernst

I’m not Stan or Bill, but might have a few things for you to check.

Try changing the line to:

doc.Save (False, False)

Also which form are you using when creating this calendar entry? Certain forms need values set for them to show properly within the calendar (i.e. CalendarDateTime).

You might have access to read someone else’s calendar, but if they have not delegated in the calendar delegation for you to have write access, then you can only send an invite to them vs posting an actual calendar entry (as far as I know). I think it’s an access/delegation issue which is keeping you from saving in their calendar.

Subject: RE: ? for Stan Rogers/Bill Ernst

I appreciate your post David. I had tried the doc.Save (False, False) previously without success. I’m using the “_Calendar Entry” form. And I have set the default to Reminder. I have set the date, time, and subject fields for the form.

I can manually create an entry into the other person’s calendar, so I have assumed that I can create one programmatically. I am not at all familiar with Lotus Notes. I create the document by modifiying an existing email module. Consequently, the email module creates the document and saves as a draft, even though it successfully sends the document.

Subject: ? for Stan Rogers/Bill Ernst

I’m not Stan or Bill either, but I have created documents in calendars before, albeit not from notes.The code below is the lotus script I used to create an appointment. Anything with a “doc.” is a field on the appointment - maybe you need to set some of these to get your calendar entries to appear properly?

doc.Subject="Reminder - please call " & thisDoc.comname1(0)

doc.ExcludeFromView=“D” 'ensures it doesn’t appear in drafts view

doc.RemoveItem(“$AlarmOffset”)

Set dateitem = thisDoc.GetFirstItem(“callback”)

Set timeitem = thisDoc.GetFirstItem(“calltime”)

Set AlarmTime = New NotesDateTime(dateitem.DateTimeValue.DateOnly & "

" &

timeitem.DateTimeValue.TimeOnly)

Call doc.ReplaceItemValue(“$AlarmTime”, AlarmTime.LSLocalTime)

Call doc.ReplaceItemValue(“$NoPurge”, AlarmTime.LSLocalTime)

Call doc.ReplaceItemValue(“$AlarmDescription” , doc.Subject)

doc.StartDateTime=AlarmTime.LSLocalTime

doc.ReminderTime=AlarmTime.LSLocalTime

doc.EndDateTime=AlarmTime.LSLocalTime

doc.CalendarDateTime=AlarmTime.LSLocalTime

doc.BookFreeTime=“1”

doc.CHAIR=ns.UserName

doc.ORGDONTDOUBLEBOOK=“”

doc.ORGTABLE=“C0”

doc.PRINCIPAL=ns.UserName

doc.tmpApptFlags=“”

Call doc.ReplaceItemValue(“_ViewIcon” , 10)

Call doc.ReplaceItemValue(“$Alarm” , 1)

Call doc.ReplaceItemValue(“$BusyPriority” , “2”)

Call doc.ReplaceItemValue(“$PublicAccess” , “1”)

Call doc.ReplaceItemValue(“$BusyName” , ns.UserName)

Call doc.ReplaceItemValue(“$PrevBusyName” , ns.UserName)

admittedly, this was used a long time ago (probably notes4) so may not be relevant anymore. As for creating entries in other peoples’ calendars - make sure that the notes ID access is using has sufficient access on the ACL of the users in question. See your notes admins for help on this one if you think that this may not be the case.

Hope that helps

Ben