Page 1 of 1

Read inbox from Outlook

Posted: Thu Jul 13, 2006 2:31 pm
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


Re: Read inbox from Outlook

Posted: Thu Jul 13, 2006 4:31 pm
by Enrico Maria Giordano
Have you checked the file VBAOUTL*.CHM?

EMG

Re: Read inbox from Outlook

Posted: Sun Jul 16, 2006 9:30 pm
by NK
EnricoMaria wrote:Have you checked the file VBAOUTL*.CHM?

EMG
Yes, but nothing found :oops:

Re: Read inbox from Outlook

Posted: Sun Jul 16, 2006 9:37 pm
by Enrico Maria Giordano
NK wrote:
EnricoMaria wrote:Have you checked the file VBAOUTL*.CHM?

EMG
Yes, but nothing found :oops:
Have a look at MailItem object's properties (as an example, I can see the To property).

EMG