Calendar Appointment with Lotus Script

I made an appointment with lotus script, it is shown in “Meetings” but it doesn’t appear in the “Calendar”.

This is my code

    Dim db As NotesDatabase 

Dim doc As NotesDocument 

Dim session As New NotesSession 

Dim ws As New NotesUIWorkspace 

Dim Titulo As String 

Dim DateTime As  NotesDateTime 

Dim HoraInicio, HoraFin, FechaInicio, FechaFin As String  

FechaInicio ="02/01/2007"

FechaFin ="03/01/2007"

HoraInicio = "07:00:00"

HoraFin = "09:00:00"



Set DateTime = New notesDateTime("Now")

Set db = session.GetDatabase ("SERVER","mail\JUZ.nsf")



Titulo = ws.CurrentDocument.Document.txtTipoMov(0)

Set doc = db.CreateDocument ()

With doc

	.ReplaceItemValue "$AltPrincipal", "CN=sss/O=TSJ_Neuquen"

	.ReplaceItemValue "$BusyName", "CN=sss/O=TSJ_Neuquen"

	.AltChair="CN=sss/O=TSJ_Neuquen"

	.Replaceitemvalue "From",session.UserName 

	.Principal=	"CN=sss/O=TSJ_Neuquen"

	.tmpChair="CN=sss/O=TSJ_Neuquen"

	.Chair=session.UserName

	

	.ReplaceItemValue "$Alarm", 1

	.ReplaceItemValue "OrgConfidential", "Public"

	.ReplaceItemValue "$AlarmDescription", "alarm description"

	.ReplaceItemValue "$AlarmMemoOptions", ""

	.ReplaceItemValue "$AlarmOffset", -1

	.ReplaceItemValue "$AlarmSound","tada"

	.ReplaceItemValue "$AlarmUnit", "M"

	.ReplaceItemValue "$BusyPriority", "1"

	.ReplaceItemValue "$HFFlags", "1"

	.ReplaceItemValue "$SMTPKeepNotesItems", "1"

	.Replaceitemvalue "$CSFlags","c"

	

	Dim CSWISL (1 To 5) As String

	CSWISL(1)= "S:1"

	CSWISL(2)= "L:1"

	CSWISL(3)="B:1"

	CSWISL(4)="R:1"

	CSWISL(5)="E:1"

	.CSWISL=CSWISL

	

	.Replaceitemvalue "$CSVersion","2"

	.Replaceitemvalue "$NoPurge", dateTime.lsLocaltime

	.Replaceitemvalue "$PublicAccess","1"

	.Alarms = "1"

	.apptUNID=doc.UniversalID 

	.AppointmentType = "0" 

	.Form = "Appointment"

	.MeetingType="1"

	.OrgRepeat="1"

	.OrgTable="C0"

	.SchedulerSwitcher="1"

	.SequenceNum=1

	

	.StartDateTime= Datevalue(FechaInicio)

	.EndDateTime=Datevalue( FechaFin)

	.StartDate = Datevalue(FechaInicio)

	.StartTime = Timevalue(HoraInicio)

	.EndDate =Datevalue( FechaFin)

	.EndTime = Timevalue(HoraFin)

	

	.Subject = Titulo

	.tmpAdditionalInviteeButton="1"

	.tmpAdditionalRoomsButton="1"

	.tmpAppointmentType="Appointment"

	.tmpAppointmentType_1="Appointment"

	.tmpEventLabel="Appointment"

	.tmpParticipantHW="1"

	.tmpRW="1"

	.tmpShowTZ="0"

	.UpdateSeq=1

	.WebDateTimeInit="1"

	.ReplaceItemValue "_viewIcon", 160

	.ComputeWithForm True,False

	.save true, false

Thanks in advance

Elio

Subject: Maybe this will help.

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/b463e65f00820eaa85256f85007012b7?OpenDocument

Subject: RE: Maybe this will help.

i think it doesn’t help me… too bad… i can’t see the difference with my code that make my entry to not appear in the calendar…any other idea?

thanks any way Michael

Subject: Solution

it can’t be shown in the calendar unless it has a date in the CalendarDateTime field…That’s all…