![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Well after all that, I have managed to find (and delete) an appointment in Outlook using OPal and OleAuto! I will post the code and an explanation soon for those interested... although judging by the feedback, not too many. Anyway, at least I'm pleased... Paul. |
#4
| |||
| |||
|
|
Well after all that, I have managed to find (and delete) an appointment in Outlook using OPal and OleAuto! I will post the code and an explanation soon for those interested... although judging by the feedback, not too many. Anyway, at least I'm pleased... Paul. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Let me first say that I am still unable to get Ole "find" or "search" to work but I have been able to achieve what I wanted to do. That is, to use Opal to save a new appointment, initially created in the database, in Outlook for all to see. Then to delete the appointment when required, also using Opal. The easy part was creating an appointment. Finding and deleting the appointment was difficult for me, particularly since I have no programming expertise outside Paradox and the only examples I could find were in VB, C or eventually in Delphi. The latter finally helped clarify what is required... Nothing revolutionary but I have not seen it done in Paradox before... var ol, namespace, AppointmentsFolder ,objInboxItems, vAppItem, Items oleAuto s String dte datetime endVar ol.Open("Outlook.Application") NameSpace = ol.GetNamespace("MAPI") AppointmentsFolder = NameSpace.GetDefaultFolder(9) ; 9 being the calendar constant objInboxItems = AppointmentsFolder.Items ; gets appointment items L = objInboxItems.count() ;counts the number of future appointments for i from 1 to L vAppItem = objInboxItems.Item(i) ; scans through the AppointmentItems from most recently added to oldest entry s = vAppItem.Subject ; stores subject line from each appointment if advMatch(s, "70651") then ; match specified value such as Paradox table index value which was stored in subject line for easy retrieval when searching for appointment now. ; alternatively dte = vAppItem.Start ; you could also search using "datetime" for a specific record with this start value. ;if advMatch(dte, "09:00:00, 07/09/2006") then (or some other Appointment item) vAppItem^delete() endif ; then delete it if the match is found. endfor This only works for a single non-recurring appointment, which is fine for my requirements. I will probably create a table to keep a record of appointments which have been copied to Outlook to assist in management. I would appreciate any further comments. Paul. |
#7
| |||
| |||
|
|
Hi Paul, did yuo manage the find job? I have some experience in importing outlook data, but always loop through the whole data which is time consuming :-) Thies OzPaul schrieb: Well after all that, I have managed to find (and delete) an appointment in Outlook using OPal and OleAuto! I will post the code and an explanation soon for those interested... although judging by the feedback, not too many. Anyway, at least I'm pleased... Paul. |
#8
| |||
| |||
|
|
Thies , I finally found a FIND syntax that works. The example below searches the Subject field of the Calendar Appointments. ol.Open("Outlook.Application") NameSpace = ol.GetNamespace("MAPI") AppointmentsFolder = NameSpace.GetDefaultFolder(9) ; 9 being the calendar constant objInboxItems = AppointmentsFolder.Items ; gets appointment items Appt = objInboxItems^Find("[Subject] = Test2") ; finds the value Test2 in the subject field Appt^display() Regards Paul. |
#9
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |