Mark Appointment as Penciled In

I have function that adds a calendar entry. I would like to change the “Pencil In” identifier to checked. Does anyone know the Feild that needs to be changed?

Here is a copy of my code:

Public Function SendNewNotesAppointment(ByVal myFrm As Form, ByVal UserName As String, ByVal UserPassword As String, ByVal Subject As String, ByVal Body As String, ByVal ApptDate As String, ByVal StartTime As Date, ByVal MinsDuration As Integer) As Boolean

Dim MailDbName As String

Dim strSTime As String

Dim strETime As String

Dim CalenDoc As Object

Dim NotesDB As Object

Dim MySession As Object

Dim ServerName As String



ServerName = "SLC_SHR_NOTES02/American Express"

On Error GoTo SendNotesErr

myFrm.MousePointer = vbArrowHourglass



strSTime = CStr(FormatDateTime(StartTime, vbShortTime))

strETime = CStr(FormatDateTime(DateAdd("n", MinsDuration, StartTime), vbShortTime))



MailDbName = "mail\" + UserName + ".nsf"

Set MySession = CreateObject("Lotus.NotesSession")

If Not UserPassword = "~" Then

    Call MySession.Initialize(UserPassword)

Else

    Call MySession.Initialize

End If



Set NotesDB = MySession.GETDATABASE(ServerName, MailDbName, False)

If Not NotesDB.ISOPEN Then Exit Function



Set CalenDoc = NotesDB.CREATEDOCUMENT

    CalenDoc.REPLACEITEMVALUE "Form", "Appointment"

    CalenDoc.REPLACEITEMVALUE "AppointmentType", "0"

    CalenDoc.REPLACEITEMVALUE "STARTDATETIME", CDate(ApptDate & " " & strSTime)

    CalenDoc.REPLACEITEMVALUE "CALENDARDATETIME", CDate(ApptDate & " " & strSTime)

    CalenDoc.REPLACEITEMVALUE "EndDateTime", CDate(ApptDate & " " & strETime)

    CalenDoc.REPLACEITEMVALUE "Subject", Subject

    CalenDoc.REPLACEITEMVALUE "Body", Body

    CalenDoc.REPLACEITEMVALUE "MeetingType", 1

    CalenDoc.REPLACEITEMVALUE "$Alarm", -10



CalenDoc.COMPUTEWITHFORM True, False

CalenDoc.Save True, False

SendNewNotesAppointment = True



myFrm.MousePointer = vbDefault



Exit Function

SendNotesErr:

DoCmd.Hourglass False

SendNewNotesAppointment = False

End Function

Subject: RE: (Revised) Mark Appointment as Penciled In

I found my old code: Set item = New NotesItem(doc, “$BusyName”, notessession.UserName)

Set item = New NotesItem(doc, "$BusyPriority", "2")

‘next few lines are for setting users’ personal alarms

doc.Alarms = "1"

Set item = New NotesItem(doc, "$Alarm", 1)

Set item = New NotesItem(doc, "$AlarmDescription", "Text that goes in alarm window")

Set item = New NotesItem(doc, "$AlarmMemoOptions", "")

Set item = New NotesItem(doc, "$AlarmOffset", -15) '15 		...

Set item = New NotesItem(doc, "$AlarmUnit", "M") '... minutes

'back to pencil stuff …

doc.BookFreeTime = "1"

Set item = New NotesItem(doc, "_ViewIcon", 160) 'the pencil icon

Subject: Here is the list of fields…

Calendar and scheduling features are available through the C API. This section will focus on how to add an appointment or a meeting invitation to a User’s schedule, delete a scheduled event from a User’s schedule and query a User’s busy/free time information.

These articles may also help you with C&S development…

Lotus Education On Demand: Creating Calendar Views in Notes: The Calendar view is a view style that allows documents, organized by date and time, to appear in a calendar format. This tutorial covers the tasks involved in creating a Calendar view

Building Lotus Notes/Domino calendar applications: Many people use the Lotus Notes calendar “right out of the box.” But did you know you can also incorporate calendar features into your own custom-built applications? This article explains how.

Alan Lepofsky - Manager Software Group Business Partner Marketing
Read my Lotus Notes Tips and Tricks Blog
Innovate. Collaborate. Dominate. IBM Lotus Notes/Domino 7

Real-time business. Now you’re talking. IBM Lotus Sametime 7.5
IBM Business Partner Program - IBM PartnerWorld