Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding appointment by EntryID
Message
De
18/04/2006 08:19:05
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Finding appointment by EntryID
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01114246
Message ID:
01114246
Vues:
74
Hello,

I'm using the following code to find an appointment in Microsoft Outlook based on an EntryID I stored in the past.

-------------------------------------------------
LOCAL loOutlook as "Outlook.Application"
loOutlook = CREATEOBJECT("Outlook.Application")
loNameSpace = loOutlook.GetNamespace("MAPI")
loRecipient = loNameSpace.CreateRecipient("AnyUserName")
loRecipient.Resolve()
IF loRecipient.Resolved = .F.
MessageBox("Account not accessable !")
ENDIF
lcCurrentUserName = loRecipient.Name
lcEntryID = "0000000054BC51CB44046E4E996642DEF62A3F430700D5E163..."

loFolder = loNameSpace.GetSharedDefaultFolder(loRecipient,9)
loItems = loFolder.Items

oMyItem = loItems.GetItemFromId( lcEntryID )
IF VARTYPE(oMyItem) = "O"
oMyItem.Display()
ENDIF
----------------------------------

Running this code I get an OLE error code 0x80020006 : Unknown COM status code. Does anyone knows why ?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform