Hi I am trying to create appointments in folders form Navision using outllok atuomation as follows: CREATE(oApp); oNS := oApp.GetNamespace(‘mapi’); oRecipient := oNS.CreateRecipient(Recipient); oFolder := oNS.GetSharedDefaultFolder(oRecipient,9); //9 is constant for Outlook.OlDefaultCalendar.olFolderCalendar oAppt := oFolder.Items.Add(1); //1 is constant for Outlook.OlItemType.olAppointmentItem oAppt.Subject := Subject; oAppt.Location := Location; StartTime := CREATEDATETIME(Start,Time); oAppt.Start := StartTime; oAppt.Duration := (Duration/60000); oAppt.ReminderSet := TRUE; oAppt.ReminderMinutesBeforeStart := 15; oAppt.BusyStatus(2); //2 is constant for Outlook.OlBusyStatus.olBusy oAppt.IsOnlineMeeting := FALSE; oAppt.Save; CLEAR(oAppt); The problem I am having is with the line oAppt.Start := StartTime; The microsoft help pages say that the start property takes a datetime and I am passing a datetime but when I compile the code I get a type conversion message saying that the start property is expecting a date only. Has anyone else had this problem? I spoke to another developer who said that the datetime type is a recent addition to Navision so maybe Navaion doesn’t recognise the datetime type required. Any thoughts would be appriciated. Debbie
could you solve your problem at last?. I need to create an automatically appointment and tried with your code but I’m not sure about datatypes of oApp, oAppt, oRecipient, etc… I got a few datatype errors, could you tell me the variable’s datatypes?