home *** CD-ROM | disk | FTP | other *** search
- * Test code for Schedule+ save appointment and meeting functions.
-
- * load the FLL.
-
- SET LIBRARY TO foxmapi.fll
-
- * start MAPI and SPLUS sessions.
-
- hmapisession = 0
- hsplussession = 0
- retval=mplogon(0, "", "", 3, 0, @hmapisession)
- retval=spbegin(hmapisession, 0, 0, 0, @hsplussession)
-
- * create cursors for appointments, attendance, and messages.
-
- =mpcursor("SPlusAppt", "")
- =mpcursor("SPlusAttd", "")
- =mpcursor("SPlusMesg", "")
-
- * Set initial values. Refer to Schedule+ help file for details
- * of these fields.
-
- SELECT splusappt
- SET SAFETY OFF
- ZAP
- SET SAFETY ON
- APPEND BLANK
-
- REPLACE reserved WITH 0
- REPLACE itemtype WITH "OrganizedMeeting"
- REPLACE flags WITH 0
- REPLACE assoccount WITH 0
- REPLACE orgitemid WITH ""
- REPLACE attendcnt WITH 1
- REPLACE recurrence WITH ""
- REPLACE datestart WITH "1993/08/16 12:30"
- REPLACE dateend WITH "1993/08/16 13:30"
- REPLACE TEXT WITH "Hello from Foxprow"
-
- * Fill in MapiAttd with fields for user Chriscap.
-
- retval=mpresolve(0, 0, "Chriscap", 9, 0, "MapiAttd")
- WAIT WINDOW "The MPResolveName code is " + STR(retval)
-
- SELECT mapiattd
- GOTO TOP
- REPLACE reserved WITH 0
- REPLACE recipclass WITH 1
-
- SELECT splusattd
- SET SAFETY OFF
- ZAP
- SET SAFETY ON
- APPEND BLANK
- REPLACE reserved WITH 0
- REPLACE usertype WITH "Individual"
- REPLACE STATUS WITH 1
-
- * Create new appointment.
-
- lpszitemid = ""
-
- retval = spsaveappt(hsplussession, 0, "", "SPlusAppt", "", "SPlusAttd", "MapiAttd", 0, 0, @lpszitemid)
- WAIT WINDOW "return from SPSaveAppt = " + STR(retval) + " ItemID = " + lpszitemid
-
- SELECT splusmesg
- APPEND BLANK
-
- REPLACE reserved WITH 0
- REPLACE subject WITH splusappt.text
- REPLACE notetext WITH ""
- REPLACE messagtype WITH "IPM.Microsoft Schedule.MtgReq"
- REPLACE daterecved WITH "1993/06/15 10:30"
- REPLACE convertnid WITH ""
- REPLACE flags WITH 65536
- REPLACE recipcount WITH splusappt.attendcnt
- REPLACE filecount WITH 0
- REPLACE sentforcnt WITH 0
-
- * Create new meeting.
-
- retval = spsendmeet(0, 0, "SPlusMesg", "MapiAttd", "", "", "SPlusAppt", "", "SPlusAttd", "MapiAttd", 0, 0)
- WAIT WINDOW "return from SPSendMeet = " + STR(retval)
-
- * Logoff from SPLUS and MAPI.
-
- retval=spend(hsplussession, 0, 0, 0)
- retval=mplogoff(hmapisession, 0, 0, 0)
-
- SET LIBRARY TO
-
-