Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing an Outlook PST
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00762464
Message ID:
00765019
Vues:
41
I've run into a particular problem when using similar code. Maybe someone has a thought and could help me out....

About a year ago, I was hoping to integrate a part of a client's app to a particular Outlook calendar by adding appointments and reading appointments to and from an outlook calendar. The coding was simple and straightforward. However, I noticed a delay between the time that an appointment was added programmatically and when it would show up in the appointments item collection. The delay varied, but was always more than 30 seconds!

This was a problem, and we ended up changing course mid-stream and taking a different approach. But, it's always bothered me that I never got around to solving the problem.

Just to be clear what I am saying here: if I added an appointment and then opened that day's events on the calendar... voila! But if I added an appointment, then queried the collection using the GetSharedDefaultFolder method, the new appointment wouldn't be there. It wasn't a screen refresh issue or an app data requery issue or anything like that: in fact, even if I tried querying from a whole other machine/user, a few seconds after the first machine/user added the appointment, no dice....

Any thoughts or similar experiences?



>Try this code ,
>
>
>**************************************************
>Public oform1
>oform1=createobject("form1")
>oform1.Show
>Return
>**************************************************
>Define Class form1 As Form
>
>    Height = 400
>    Width = 620
>    DoCreate = .T.
>    Caption = "Form1"
>    Name = "Form1"
>
>    Add Object cmdExit As CommandButton With ;
>        Top = 330, ;
>        Left = 504, ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "E\<xit", ;
>        Name = "CmdExit"
>
>    Add Object cmdCalendar As CommandButton With ;
>        Top = 330, ;
>        Left = 12, ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "\<Calendar", ;
>        Name = "CmdCalendar"
>
>    Add Object cmdInBox As CommandButton With ;
>        Top = 330, ;
>        Left = 108, ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "\<In Box", ;
>        Name = "CmdInBox"
>
>    Add Object cmdSent As CommandButton With ;
>        Top = 330, ;
>        Left = 204, ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "\<Sent Mail", ;
>        Name = "CmdSent"
>
>    Add Object cmdContact As CommandButton With ;
>        Top = 330, ;
>        Left = 300, ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "\<AddressBook", ;
>        Name = "CmdContact"
>
>    Add Object cmdNewMail As CommandButton With ;
>        Top = 360, ;
>        Left =12 , ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "New \<Mail", ;
>        Name = "cmdNewMail"
>
>    Add Object cmdNewTask As CommandButton With ;
>        Top = 360, ;
>        Left =108 , ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "New \<Task", ;
>        Name = "cmdNewTask"
>
>    Add Object cmdNewContact As CommandButton With ;
>        Top = 360, ;
>        Left =204 , ;
>        Height = 27, ;
>        Width = 84, ;
>        Caption = "\<New Contact", ;
>        Name = "cmdNewContact"
>
>    Add Object cmdNewAppointment As CommandButton With ;
>        Top = 360, ;
>        Left =300 , ;
>        Height = 27, ;
>        Width = 110, ;
>        Caption = "New A\<ppointment", ;
>        Name = "cmdNewAppointment"
>
>    Add Object olecontrol1 As OleControl With ;
>        Top = 12, ;
>        Left = 12, ;
>        Height = 306, ;
>        Width = 588, ;
>        Name = "Olecontrol1", ;
>        OleClass = "OVCtl.OVCtl.1"
>
>    Procedure cmdExit.Click
>       Thisform.Release()
>    Endproc
>
>    Procedure cmdNewMail.Click
>       Thisform.olecontrol1.NewMessage()
>    ENDPROC
>
>    Procedure cmdNewTask.Click
>       Thisform.olecontrol1.NewTask()
>    Endproc
>
>    Procedure cmdNewContact.Click
>       Thisform.olecontrol1.NewContact()
>    ENDPROC
>
>    Procedure cmdNewAppointment.Click
>       Thisform.olecontrol1.NewAppointment()
>    Endproc
>
>    Procedure cmdCalendar.Click
>       Thisform.olecontrol1.Folder = "CALENDAR"
>       Thisform.Caption = "OutLook Calendar"
>       Thisform.Refresh()
>    Endproc
>
>    Procedure cmdInBox.Click
>       Thisform.olecontrol1.Folder = "INBOX"
>       Thisform.Caption = "OutLook InBox"
>       Thisform.Refresh()
>    Endproc
>
>    Procedure cmdSent.Click
>       Thisform.olecontrol1.Folder = "SENT ITEMS"
>       Thisform.Caption = "OutLook Sent Items"
>       Thisform.Refresh()
>    Endproc
>
>    Procedure cmdContact.Click
>       Thisform.olecontrol1.Folder = "CONTACTS"
>       Thisform.Caption = "OutLook Address Book"
>       Thisform.Refresh()
>    Endproc
>
>    Procedure olecontrol1.Init
>       This.Folder = "InBox"
>    Endproc
>
>Enddefine
>*******************************************************
>** EOF
>*******************************************************
>
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform