Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to acess sent items
Message
 
To
24/06/2002 07:50:44
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00671577
Message ID:
00672934
Views:
14
Something like this:
*--------------------
outlook = CREATEOBJECT("outlook.application")

* if there are many PostBoxes available, specify one, like having USER_NAME
iPB=0
with outlook.GetNamespace("MAPI")
for ia=1 to .Folders.Count
if "USER_NAME" $upper(.Folders(ia).Name)
iPB=ia
EXIT
endif
endfor
endwith

if iPB=0
wait wind time 1.0 "Terminating. Folder not found."
outlook=.NULL.
release outlook
RETURN
endif

*Find Sent Folder inside
iSent=0
with outlook.GetNamespace("MAPI").Folders(iPB)
for ia=1 to .Folders.Count
if "SENT"$upper(.Folders(ia).Name)
iSent=ia
EXIT
endif
endfor
endwith
if iSent=0
wait wind time 1.0 "Terminating. Folder not found."
outlook=.NULL.
release outlook
RETURN
endif
* Is there anything
if outlook.GetNamespace("MAPI").Folders(iPB).Folders(iSent).Items.Count<=0
wait wind time 1.0 "Folder is empty."
outlook=.NULL.
release outlook
RETURN
else
with outlook.GetNamespace("MAPI").Folders(iPB).Folders(iSent).Items
FOR lnI = 1 TO .Count
?.Item[lnI].subject
* Registry Security setting must be changed here to give free access to following properties
* ?.Item[lnI].SenderName
* ?.Item[lnI].Recipients.Count
* ?.Item[lnI].Recipients(1).Name
* ?empty(.Item[lnI].CC)
* Registry setting must be changed back to avoid unauthorized access
ENDFOR
endwith
endif


outlook=.NULL.
release outlook
*------------------
Regards


>Does any one know how to get access to the information in the sent items folder for Outlook Express. Is there a way to communicate with the IDX files.
>
>Thanks Gary
Previous
Reply
Map
View

Click here to load this message in the networking platform