Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding appointment by EntryID
Message
From
18/04/2006 08:19:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Finding appointment by EntryID
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01114246
Message ID:
01114246
Views:
73
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 ?
Next
Reply
Map
View

Click here to load this message in the networking platform