Outlook OLE

Re: Outlook OLE

Postby James Bott » Tue Nov 24, 2009 2:35 pm

Michel,

I tried Googling "outlook calendar item creation time" and there are a number of references to this topic which may help.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Outlook OLE

Postby Rochinha » Sun Dec 20, 2009 12:06 am

James,

This may help you:

Code: Select all  Expand view

#include "fivewin.ch"
#include "common.ch"

#define olFolderDeletedItems               3
#define olFolderOutbox                     4
#define olFolderSentMail                   5
#define olFolderInbox                      6
#define olFolderCalendar                   9
#define olFolderContacts                  10
#define olFolderJournal                   11
#define olFolderNotes                     12
#define olFolderTasks                     13
#define olFolderDrafts                    16
#define olPublicFoldersAllPublicFolders   18

#define olMailItem                         0
#define olAppointmentItem                  1
#define olContactItem                      2
#define olTaskItem                         3
#define olJournalItem                      4
#define olNoteItem                         5
#define olPostItem                         6

function Main()
   LOCAL objOutlook
   LOCAL recipient, message, subject

   SysSettings()

   // Create Outlook object reference
   objOutlook := OpenOleServer( "Outlook.Application" )
   IF objOutlook <> NIL

      // Create a new Appointment
      objAppointment := objOutlook:CreateItem(olAppointmentItem)

      // Create a new Appointment
      objAppointment:Start := date() + 10
      objAppointment:AllDayEvent := .T.

      // insert the Appointment
      objAppointment:Subject  := "Anual Inventory"
      objAppointment:Body     := "Anual Inventory of 2009."
      objAppointment:Location := "5volution.COM"

      objAppointment:ReminderMinutesBeforeStart := 15
      objAppointment:ReminderSet := .T.

      // Save the data
      objAppointment:Save()

      MsgStop( "Appoint included." )
   ENDIF
   RETURN

FUNCTION OpenOleServer( cServer )
   LOCAL oServer
   IF ISCHARACTER( cServer )
      IF IsActivex( cServer )
         oServer := TOleAuto():New( cServer )
         IF oServer == NIL
            //? "ERROR! " + cServer + " not available. [" + OLEERRORTEXT()+ "]"
            RETURN NIL
         ENDIF
      ENDIF
   ENDIF
   RETURN oServer

PROCEDURE SysSettings()
   SET SCOREBOARD OFF
   SET CENTURY     ON
   SET DATE   ITALIAN
   SET BELL       OFF
   SET DELETED     ON
   SET EXACT      OFF
   SET CONFIRM     ON
   SET ESCAPE      ON
   SET WRAP        ON
   SET EPOCH TO  2000
   RETURN .t.
 
Rochinha
 
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Re: Outlook OLE

Postby MarcoBoschi » Fri Apr 16, 2010 3:06 pm

Michel,
did you resolve this problem?
valtype of these properties is always "D" ?


oCalendar:Item:SentOn

oCalendar:Item:CreationTime

oCalendar:Item:ReceivedTime

Thanks a lot
marco
User avatar
MarcoBoschi
 
Posts: 1028
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Outlook OLE

Postby MarcoBoschi » Fri Apr 16, 2010 3:24 pm

User avatar
MarcoBoschi
 
Posts: 1028
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Outlook OLE

Postby nageswaragunupudi » Fri Apr 16, 2010 3:43 pm

>>
valtype of these properties is always "D" ?
>>
In xHarbour ValType() returns 'D' for both simple Dates and DateTime values. HB_IsDateTime( d ) can be used to ascertain if the variable has Time part also.

We can use TTOC( <d> ) to show both date and timeparts formatted.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10347
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 33 guests