Alaska Software Inc. - Reading Outlook calender
Username: Password:
AuthorTopic: Reading Outlook calender
KariReading Outlook calender
on Tue, 17 Mar 2009 15:26:21 +0100
Do someone know what field "time" is named in calendar?
Best regard
Kari

#INCLUDE "outlook.CH"
#pragma Library("ascom10.lib")
PROCEDURE KALENDER(dDag)
LOCAL  oOutlook, oNS, oContacts,aItems:={}
oOutlook := CreateObject( "Outlook.Application" )
IF Empty(oOutLook)
   RETURN
ENDIF
oNS := oOutlook:GetNamespace( "MAPI" )
oContacts := oNS:getDefaultFolder( olFolderCalendar )
for y:=1 to oContacts:items:count()
    oItem := oContacts:items(y)
    cSubject:=oItem:subject
    nDuration:=oItem:Duration
    dStart:=   oItem:Start
  cTime:=  oItem:???
    aADD(aItems,{dStart,cTime,cSubject,nDuration})
    endif
next
BROWSE...
AUGE_OHRRe: Reading Outlook calender
on Tue, 17 Mar 2009 16:10:22 +0100
hi,

> Do someone know what field "time" is named in calendar?
>
>    dStart:=   oItem:Start
>   cTime:=  oItem:???
>    aADD(aItems,{dStart,cTime,cSubject,nDuration})

oItem:treatDateAsString(.T.)      --> will make Date "as" String
cStart:=   oItem:getProperty("Start")     -> now YYYYMMSSHHMMSS
 cTime:=  SubStr(cStart,7,2)+":"+;
                SubStr(cStart,9,2)+":"+;
                SubStr(cStart,11,2)


and if need "opposite"

oItem:treatDateAsString(.T.)      --> will make Date "as" String
cStart := "20090317151500"
oItem:setProperty("Start",cStart)

if you want "more" with "Outlook.Application" and Calendar
you should think about a 3PP Tool like Codejock Calender
activeX. Now with CreateObject( "Outlook.Application" ) it is
a "one Way" and it is "not update" since your last aADD().

with CJ Calender you can use "build-in" MAPI Dataprovider
fr Outlook AND Provider=Custom; to use a DBF.

any Update in DBF you can "see" in Outlook Calender when
your COMMIT (and publish() )or "opposite" when you write
into Outlook it will appear ind DBF (need refreshAll() after notify ).

Xbase++ "Wrapper" are avaiable for Express++ and "pure"
Xbase++ Version called HX_Class (LIB/DLL both "free")

write a Msg to Roger ( Express++) or me if your like it

greetings by OHR
Jimmy
p.s. for SL1 v350 only ...
... CJ oCal:mutliResources does not work with Xbase++ v350,
but Code "is working" with other(!!!) X Compiler.
KariRe: Reading Outlook calender
on Tue, 17 Mar 2009 17:37:55 +0100
Thanks Jimmy
I saw somewhere that the Time was connected to Date but
but how to get.. But now it works Great.
That was about reading.

So you men that with CJ Calender/Express++ I can for example
update my database and put one item in Outlook Calender?


Kari


"AUGE_OHR" <AUGE_OHR*AT*WEB.DE> skrev i meddelandet 
news:2c2c16d5$5f9783d2$8bd@news.alaska-software.com...
> hi,
>
>> Do someone know what field "time" is named in calendar?
>>
>>    dStart:=   oItem:Start
>>   cTime:=  oItem:???
>>    aADD(aItems,{dStart,cTime,cSubject,nDuration})
>
> oItem:treatDateAsString(.T.)      --> will make Date "as" String
> cStart:=   oItem:getProperty("Start")     -> now YYYYMMSSHHMMSS
> cTime:=  SubStr(cStart,7,2)+":"+;
>                SubStr(cStart,9,2)+":"+;
>                SubStr(cStart,11,2)
>
>
> and if need "opposite"
>
> oItem:treatDateAsString(.T.)      --> will make Date "as" String
> cStart := "20090317151500"
> oItem:setProperty("Start",cStart)
>
> if you want "more" with "Outlook.Application" and Calendar
> you should think about a 3PP Tool like Codejock Calender
> activeX. Now with CreateObject( "Outlook.Application" ) it is
> a "one Way" and it is "not update" since your last aADD().
>
> with CJ Calender you can use "build-in" MAPI Dataprovider
> fr Outlook AND Provider=Custom; to use a DBF.
>
> any Update in DBF you can "see" in Outlook Calender when
> your COMMIT (and publish() )or "opposite" when you write
> into Outlook it will appear ind DBF (need refreshAll() after notify ).
>
> Xbase++ "Wrapper" are avaiable for Express++ and "pure"
> Xbase++ Version called HX_Class (LIB/DLL both "free")
>
> write a Msg to Roger ( Express++) or me if your like it
>
> greetings by OHR
> Jimmy
> p.s. for SL1 v350 only ...
> ... CJ oCal:mutliResources does not work with Xbase++ v350,
> but Code "is working" with other(!!!) X Compiler.
>
KariRe: Reading Outlook calender
on Thu, 19 Mar 2009 20:52:43 +0100
Found this in www.xbaseforum.de and how to add to Outlook Calender
You can find good stuff there... Thanks xbaseforum.
Kari

FUNCTION LookAdd(cSubject,cMemo,dDat,nTime,nTimeLength)
local oTermin,oOutlook,oNS,oContacts
local
cTime:=strzero(int(nTime),2)+':'+strzero((nTime-Int(nTime))*100,2)+':00'
local nDuration:=int(nTimeLength)*60+(nTimeLength%1*100)
oOutlook := CreateObject( "Outlook.Application" )
oNS := oOutlook:GetNamespace( "MAPI" )
oContacts := oNS:getDefaultFolder( olFolderCalendar )
if empty(oOutlook)
   DC_MSGBOX('Not found Outlook Calender')
   RETURN(.F.)
endif
oTermin := oOutlook:CreateItem( olAppointmentItem )
oTermin:treatDateAsString(.t.)
oTermin:Subject := cSubject
//oTermin:Location := cPlace
oTermin:Start :=
alltrim(str(year(dDat)))+"-"+strzero(month(dDat),2)+"-"+strzero(day(dDat),2)+;
 cTime
oTermin:Duration := nDuration
oTermin:ReminderSet := .f.
//oTermin:ReminderTime := dDatum
oTermin:Body := cMemo
oTermin:save()
oTermin:Display()
DC_MSGBOX('Add to Outlook calender')
oOutlook:quit()
oOutlook:destroy()
oOutlook := NIL
oContacts := NIL
RETURN(.t.)







"Kari" <progex.data.@progex.se> skrev i meddelandet 
news:21f6f939$2c122e97$ae4@news.alaska-software.com...
> Thanks Jimmy
> I saw somewhere that the Time was connected to Date but
> but how to get.. But now it works Great.
> That was about reading.
>
> So you men that with CJ Calender/Express++ I can for example
> update my database and put one item in Outlook Calender?
>
>
> Kari
>
>
> "AUGE_OHR" <AUGE_OHR*AT*WEB.DE> skrev i meddelandet 
> news:2c2c16d5$5f9783d2$8bd@news.alaska-software.com...
>> hi,
>>
>>> Do someone know what field "time" is named in calendar?
>>>
>>>    dStart:=   oItem:Start
>>>   cTime:=  oItem:???
>>>    aADD(aItems,{dStart,cTime,cSubject,nDuration})
>>
>> oItem:treatDateAsString(.T.)      --> will make Date "as" String
>> cStart:=   oItem:getProperty("Start")     -> now YYYYMMSSHHMMSS
>> cTime:=  SubStr(cStart,7,2)+":"+;
>>                SubStr(cStart,9,2)+":"+;
>>                SubStr(cStart,11,2)
>>
>>
>> and if need "opposite"
>>
>> oItem:treatDateAsString(.T.)      --> will make Date "as" String
>> cStart := "20090317151500"
>> oItem:setProperty("Start",cStart)
>>
>> if you want "more" with "Outlook.Application" and Calendar
>> you should think about a 3PP Tool like Codejock Calender
>> activeX. Now with CreateObject( "Outlook.Application" ) it is
>> a "one Way" and it is "not update" since your last aADD().
>>
>> with CJ Calender you can use "build-in" MAPI Dataprovider
>> fr Outlook AND Provider=Custom; to use a DBF.
>>
>> any Update in DBF you can "see" in Outlook Calender when
>> your COMMIT (and publish() )or "opposite" when you write
>> into Outlook it will appear ind DBF (need refreshAll() after notify ).
>>
>> Xbase++ "Wrapper" are avaiable for Express++ and "pure"
>> Xbase++ Version called HX_Class (LIB/DLL both "free")
>>
>> write a Msg to Roger ( Express++) or me if your like it
>>
>> greetings by OHR
>> Jimmy
>> p.s. for SL1 v350 only ...
>> ... CJ oCal:mutliResources does not work with Xbase++ v350,
>> but Code "is working" with other(!!!) X Compiler.
>>
>
>
AUGE_OHRRe: Reading Outlook calender
on Fri, 20 Mar 2009 09:20:12 +0100
hi,

> Found this in www.xbaseforum.de and how to add to Outlook Calender
> You can find good stuff there... Thanks xbaseforum.

as you a Member you can Access 
http://www.xbaseforum.de/viewtopic.php?f=16&t=2933
where you can see Picture from Codejock activeX working with Xbase++

for Codejock Suite Pro Controls look at 
http://www.xbaseforum.de/viewtopic.php?f=16&t=3080
where you can download XCodejock "pure" Xbase++ LIB/DLL "Wrapper" for 
Codejock activeX.
for  Express++ User goto http://www.donnay-software.com/ to become "beta" 
Tester.

you NEED *.OCX activeX which can be download at 
http://www.codejock.com/downloads/
!!! use activeX Version !!!

greetings by OHR
Jimmy
Osvaldo Luis AokiRe: Reading Outlook calender
on Thu, 22 Jul 2010 17:55:13 -0300
Hi,

    Some variables of this function are undefined....

 - olAppointmentitem
 - olFolderCalendar

    It causes an error...

   Sorry, but I am looking for a function like this so much...

   Can you Help-me..

   Thanks,
   Osvaldo L Aoki


"Kari" <progex.data.@progex.se> escreveu na mensagem 
news:3856f3ff$280e4de8$aca@news.alaska-software.com...
> Found this in www.xbaseforum.de and how to add to Outlook Calender
> You can find good stuff there... Thanks xbaseforum.
> Kari
>
> FUNCTION LookAdd(cSubject,cMemo,dDat,nTime,nTimeLength)
> local oTermin,oOutlook,oNS,oContacts
> local
> cTime:=strzero(int(nTime),2)+':'+strzero((nTime-Int(nTime))*100,2)+':00'
> local nDuration:=int(nTimeLength)*60+(nTimeLength%1*100)
> oOutlook := CreateObject( "Outlook.Application" )
> oNS := oOutlook:GetNamespace( "MAPI" )
> oContacts := oNS:getDefaultFolder( olFolderCalendar )
> if empty(oOutlook)
>   DC_MSGBOX('Not found Outlook Calender')
>   RETURN(.F.)
> endif
> oTermin := oOutlook:CreateItem( olAppointmentItem )
> oTermin:treatDateAsString(.t.)
> oTermin:Subject := cSubject
> //oTermin:Location := cPlace
> oTermin:Start :=
> alltrim(str(year(dDat)))+"-"+strzero(month(dDat),2)+"-"+strzero(day(dDat),2)+;
> cTime
> oTermin:Duration := nDuration
> oTermin:ReminderSet := .f.
> //oTermin:ReminderTime := dDatum
> oTermin:Body := cMemo
> oTermin:save()
> oTermin:Display()
> DC_MSGBOX('Add to Outlook calender')
> oOutlook:quit()
> oOutlook:destroy()
> oOutlook := NIL
> oContacts := NIL
> RETURN(.t.)
>
>
>
>
>
>
>
> "Kari" <progex.data.@progex.se> skrev i meddelandet 
> news:21f6f939$2c122e97$ae4@news.alaska-software.com...
>> Thanks Jimmy
>> I saw somewhere that the Time was connected to Date but
>> but how to get.. But now it works Great.
>> That was about reading.
>>
>> So you men that with CJ Calender/Express++ I can for example
>> update my database and put one item in Outlook Calender?
>>
>>
>> Kari
>>
>>
>> "AUGE_OHR" <AUGE_OHR*AT*WEB.DE> skrev i meddelandet 
>> news:2c2c16d5$5f9783d2$8bd@news.alaska-software.com...
>>> hi,
>>>
>>>> Do someone know what field "time" is named in calendar?
>>>>
>>>>    dStart:=   oItem:Start
>>>>   cTime:=  oItem:???
>>>>    aADD(aItems,{dStart,cTime,cSubject,nDuration})
>>>
>>> oItem:treatDateAsString(.T.)      --> will make Date "as" String
>>> cStart:=   oItem:getProperty("Start")     -> now YYYYMMSSHHMMSS
>>> cTime:=  SubStr(cStart,7,2)+":"+;
>>>                SubStr(cStart,9,2)+":"+;
>>>                SubStr(cStart,11,2)
>>>
>>>
>>> and if need "opposite"
>>>
>>> oItem:treatDateAsString(.T.)      --> will make Date "as" String
>>> cStart := "20090317151500"
>>> oItem:setProperty("Start",cStart)
>>>
>>> if you want "more" with "Outlook.Application" and Calendar
>>> you should think about a 3PP Tool like Codejock Calender
>>> activeX. Now with CreateObject( "Outlook.Application" ) it is
>>> a "one Way" and it is "not update" since your last aADD().
>>>
>>> with CJ Calender you can use "build-in" MAPI Dataprovider
>>> für Outlook AND Provider=Custom; to use a DBF.
>>>
>>> any Update in DBF you can "see" in Outlook Calender when
>>> your COMMIT (and publish() )or "opposite" when you write
>>> into Outlook it will appear ind DBF (need refreshAll() after notify ).
>>>
>>> Xbase++ "Wrapper" are avaiable for Express++ and "pure"
>>> Xbase++ Version called HX_Class (LIB/DLL both "free")
>>>
>>> write a Msg to Roger ( Express++) or me if your like it
>>>
>>> greetings by OHR
>>> Jimmy
>>> p.s. for SL1 v350 only ...
>>> ... CJ oCal:mutliResources does not work with Xbase++ v350,
>>> but Code "is working" with other(!!!) X Compiler.
>>>
>>
>>
>
>
AUGE_OHRRe: Reading Outlook calender
on Thu, 22 Jul 2010 23:39:06 +0200
hi,

>    Some variables of this function are undefined....

these are Outlook Constante

> - olAppointmentitem
> - olFolderCalendar

c:\ALASKA\XPPW32\SOURCE\samples\activex\olimport\outlook.ch

or use

Tlb2Ch.exe "Outlook.Application" >> MYOUTLOOK.CH

greetings by OHR
Jimmy
Osvaldo Luis AokiRe: Reading Outlook calender
on Thu, 22 Jul 2010 18:48:43 -0300
OK, it is working fine now...

Where do I get documentation of ActiveX to access Outlook ?


Thanks,
Osvaldo


"Osvaldo Luis Aoki" <osvaldo@aoki-sis.com.br> escreveu na mensagem 
news:219e10d3$1b909b0f$2755c@news.alaska-software.com...
> Hi,
>
>    Some variables of this function are undefined....
>
> - olAppointmentitem
> - olFolderCalendar
>
>    It causes an error...
>
>   Sorry, but I am looking for a function like this so much...
>
>   Can you Help-me..
>
>   Thanks,
>   Osvaldo L Aoki
>
>
> "Kari" <progex.data.@progex.se> escreveu na mensagem 
> news:3856f3ff$280e4de8$aca@news.alaska-software.com...
>> Found this in www.xbaseforum.de and how to add to Outlook Calender
>> You can find good stuff there... Thanks xbaseforum.
>> Kari
>>
>> FUNCTION LookAdd(cSubject,cMemo,dDat,nTime,nTimeLength)
>> local oTermin,oOutlook,oNS,oContacts
>> local
>> cTime:=strzero(int(nTime),2)+':'+strzero((nTime-Int(nTime))*100,2)+':00'
>> local nDuration:=int(nTimeLength)*60+(nTimeLength%1*100)
>> oOutlook := CreateObject( "Outlook.Application" )
>> oNS := oOutlook:GetNamespace( "MAPI" )
>> oContacts := oNS:getDefaultFolder( olFolderCalendar )
>> if empty(oOutlook)
>>   DC_MSGBOX('Not found Outlook Calender')
>>   RETURN(.F.)
>> endif
>> oTermin := oOutlook:CreateItem( olAppointmentItem )
>> oTermin:treatDateAsString(.t.)
>> oTermin:Subject := cSubject
>> //oTermin:Location := cPlace
>> oTermin:Start :=
>> alltrim(str(year(dDat)))+"-"+strzero(month(dDat),2)+"-"+strzero(day(dDat),2)+;
>> cTime
>> oTermin:Duration := nDuration
>> oTermin:ReminderSet := .f.
>> //oTermin:ReminderTime := dDatum
>> oTermin:Body := cMemo
>> oTermin:save()
>> oTermin:Display()
>> DC_MSGBOX('Add to Outlook calender')
>> oOutlook:quit()
>> oOutlook:destroy()
>> oOutlook := NIL
>> oContacts := NIL
>> RETURN(.t.)
>>
>>
>>
>>
>>
>>
>>
>> "Kari" <progex.data.@progex.se> skrev i meddelandet 
>> news:21f6f939$2c122e97$ae4@news.alaska-software.com...
>>> Thanks Jimmy
>>> I saw somewhere that the Time was connected to Date but
>>> but how to get.. But now it works Great.
>>> That was about reading.
>>>
>>> So you men that with CJ Calender/Express++ I can for example
>>> update my database and put one item in Outlook Calender?
>>>
>>>
>>> Kari
>>>
>>>
>>> "AUGE_OHR" <AUGE_OHR*AT*WEB.DE> skrev i meddelandet 
>>> news:2c2c16d5$5f9783d2$8bd@news.alaska-software.com...
>>>> hi,
>>>>
>>>>> Do someone know what field "time" is named in calendar?
>>>>>
>>>>>    dStart:=   oItem:Start
>>>>>   cTime:=  oItem:???
>>>>>    aADD(aItems,{dStart,cTime,cSubject,nDuration})
>>>>
>>>> oItem:treatDateAsString(.T.)      --> will make Date "as" String
>>>> cStart:=   oItem:getProperty("Start")     -> now YYYYMMSSHHMMSS
>>>> cTime:=  SubStr(cStart,7,2)+":"+;
>>>>                SubStr(cStart,9,2)+":"+;
>>>>                SubStr(cStart,11,2)
>>>>
>>>>
>>>> and if need "opposite"
>>>>
>>>> oItem:treatDateAsString(.T.)      --> will make Date "as" String
>>>> cStart := "20090317151500"
>>>> oItem:setProperty("Start",cStart)
>>>>
>>>> if you want "more" with "Outlook.Application" and Calendar
>>>> you should think about a 3PP Tool like Codejock Calender
>>>> activeX. Now with CreateObject( "Outlook.Application" ) it is
>>>> a "one Way" and it is "not update" since your last aADD().
>>>>
>>>> with CJ Calender you can use "build-in" MAPI Dataprovider
>>>> für Outlook AND Provider=Custom; to use a DBF.
>>>>
>>>> any Update in DBF you can "see" in Outlook Calender when
>>>> your COMMIT (and publish() )or "opposite" when you write
>>>> into Outlook it will appear ind DBF (need refreshAll() after notify ).
>>>>
>>>> Xbase++ "Wrapper" are avaiable for Express++ and "pure"
>>>> Xbase++ Version called HX_Class (LIB/DLL both "free")
>>>>
>>>> write a Msg to Roger ( Express++) or me if your like it
>>>>
>>>> greetings by OHR
>>>> Jimmy
>>>> p.s. for SL1 v350 only ...
>>>> ... CJ oCal:mutliResources does not work with Xbase++ v350,
>>>> but Code "is working" with other(!!!) X Compiler.
>>>>
>>>
>>>
>>
>>
>
AUGE_OHRRe: Reading Outlook calender
on Fri, 23 Jul 2010 15:56:40 +0200
hi,

> Where do I get documentation of ActiveX to access Outlook ?

if you have Office 2003 look for VBAOL11.CHM
with Office 2007/2010 you have to look into VBA Help

greetings by OHR
Jimmy
Anand Kumar GuptaRe: Reading Outlook calender
on Wed, 18 Mar 2009 16:31:43 +0530
Where can I get more info on the below mentioned Wrapper ?
(I got Express++ licence)

Anand

"AUGE_OHR" <AUGE_OHR*AT*WEB.DE> wrote in message 
news:2c2c16d5$5f9783d2$8bd@news.alaska-software.com...

<snip>>
> Xbase++ "Wrapper" are avaiable for Express++ and "pure"
> Xbase++ Version called HX_Class (LIB/DLL both "free")
>
> write a Msg to Roger ( Express++) or me if your like it
<snip>
AUGE_OHRRe: Reading Outlook calender
on Wed, 18 Mar 2009 13:10:11 +0100
hi,

> Where can I get more info on the below mentioned Wrapper ?
> (I got Express++ licence)

http://www.donnay-software.com/
called XCodejock Project

greetings by OHR
Jimmy