FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Outlook oMail:ReceivedTime does not work in olFolderInBox 6
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Outlook oMail:ReceivedTime does not work in olFolderInBox 6
Posted: Wed Jun 09, 2010 12:09 PM

Hi to all,
What other properties should I use to get the date and time?

DEFINE olFolderInBox 6

include "fivewin.ch"

FUNCTION MAIN()

LOCAL oOutlook := TOleAuto():New( "Outlook.Application" )
LOCAL oNameSpace := oOutlook:getnamespace('MAPI')
LOCAL oFolder := oNameSpace:GetDefaultFolder( olFolderInBox )
LOCAL nItems
LOCAL oMail
LOCAL iMsg

nItems := oFolder:Items:Count

FOR iMsg := 1 TO nItems

oMail := oFolder:Items[ iMsg ]

? oMail:Subject
// ? omail:SentOn
? oMail:CreationTime
? oMail:ReceivedTime  // does not work

NEXT iMsg

RETURN NIL

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Outlook oMail:ReceivedTime does not work in olFolderInBox 6
Posted: Fri Jun 11, 2010 01:14 PM

Please can someone try and tell me if this program crashes at the line

? oMail:ReceivedTime

Thanks

marco

Marco Boschi
info@marcoboschi.it
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: Outlook oMail:ReceivedTime does not work in olFolderInBox 6
Posted: Sat Jun 12, 2010 12:54 AM
Marco

The following code works for me -

Code (fw): Select all Collapse
for each oItem In oCMSFolder:Items
   nItem++
   dMail    := oItem:ReceivedTime
   cSender  := oItem:sendername
   cSubject := oItem:subject
   cBody    := oItem:body
   for each oAttach In oItem:Attachments
      cAttach := oAttach:filename
      aadd(aAttach,str(nItem,2) + cAttach)
   next
   aadd(aData,str(nItem,2) + dtoc(dMail) + (left(alltrim(cSender)  + space(30),30)) + (left(alltrim(cSubject)  + space(30),30)) + cBody)
next
SysRefresh()


cheers

Colin
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Outlook oMail:ReceivedTime does not work in olFolderInBox 6
Posted: Mon Jun 14, 2010 08:12 AM

Probably is a "release" problem

I use Microsoft Outlook 2000 (9.0.0.2814)

I will try on a recent versione

Thanks

marco

Marco Boschi
info@marcoboschi.it

Continue the discussion