I a program, i call Word or Excel with OLE.
How can i put the focus on the word or excel application , how
to put it on the top ?
Thanks
BringWindowToTop(FindWindow("OpusApp",NIL))
#define outlookFolderCalendar 9
function Main()
local oOutlook := CreateObject( "Outlook.Application" )
local oNameSpace := oOutlook:GetNameSpace( "MAPI" )
local oCalendar := oNameSpace:GetDefaultFolder( outlookFolderCalendar )
local nItems := oCalendar:Items:Count, n
for n = 1 to nItems
MsgInfo( oCalendar:Items[ n ]:Start )
MsgInfo( oCalendar:Items[ n ]:End )
MsgInfo( oCalendar:Items[ n ]:Subject )
MsgInfo( oCalendar:Items[ n ]:Body )
next
oCalendar := nil
oNameSpace := nil
oOutlook := nil
return nil
#define outlookFolderCalendar 9
function Main()
local oOutlook := CreateObject( "Outlook.Application" )
local oNameSpace := oOutlook:GetNameSpace( "MAPI" )
local oCalendar := oNameSpace:GetDefaultFolder( outlookFolderCalendar )
local oItem := oOutLook:CreateItem( 1 )
oItem:Start = Date()
oItem:End = Date()
oItem:Subject = "A test"
oItem:Save()
MsgInfo( "check Outlook calendar for today" )
oCalendar = nil
oNameSpace = nil
oOutlook = nil
oItem = nil
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 80 guests