Article ID: 173582
Article Last Modified on 2/28/2005
oOutlookObj = CREATEOBJECT("Outlook.Application")
oNamespace = oOutlookObj.GetNamespace("MAPI")
oFolder = oNamespace.GetDefaultfolder(6) && See below for other values
oFolder.Display
* Code to pause FoxPro while Outlook window is on top
IF NOT 'FOXTOOLS' $ SET('LIBRARY')
SET LIBRARY TO SYS(2004)+"FoxTools"
ENDIF
FoxWind = MAINHWND()
GetActive=RegFn('GetActiveWindow','','I') && Determine if FoxPro is
&& on top
DO WHILE .T. && Keep looping until the ActiveWindow = FoxWind
IF FoxWind = CallFn(GetActive)
EXIT
ENDIF
ENDDO
SET LIBRARY TO
oOutlookObj.Quit
The GetDefaultfolder method has several values that open different folders
in Outlook. The list below provides the default folder values.
Folder Name Value ---------------------- Deleted Items 3 Outbox 4 Sent Items 5 Inbox 6 Calendar 9 Contacts 10 Journal 11 Notes 12 Tasks 13
Keywords: kbhowto KB173582