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

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

Re: Read inbox from Outlook

Post by NK »

EnricoMaria wrote:Have you checked the file VBAOUTL*.CHM?

EMG
Yes, but nothing found :oops:
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Read inbox from Outlook

Post 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
Post Reply