Read inbox from Outlook

Post Reply
User avatar
NK
Posts: 97
Joined: Sun Nov 20, 2005 4:32 pm
Location: Germany
Contact:

Read inbox from Outlook

Post by NK »

Hi Everybody,

Does someone have experiences of you to read the inbox in Outlook via OLE?

Yet some variable names are missing for fromeMail, toemail etc..

Greeting, Norbert

Code: Select all

/
   TRY
      oOL := TOleAuto():New( "Outlook.Application" )
      lOutlookOK := .T.
   CATCH
      lOutlookOK := .F.
   END
   IF ! lOutlookOK
      RETURN ( 0 )
   ENDIF

   oNameSpace   = oOL:Get( "GetNameSpace", "MAPI" )
   oContacts    = oNameSpace:Get( "GetDefaultFolder", "6" )  // 6 = Inbox-Folder
   
   FOR nContador = 1 TO oContacts:ITEMS:Count()
         oNewContact  = oContacts:ITEMS( nContador )
         cSenderName	:= oNewContact:get( "SenderName" )
         cSubject		:= oNewContact:get( "Subject" )

  >>>> ??????

   NEXT nContador
RETURN NIL

Post Reply