Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook automate
Message
From
07/12/2013 16:07:17
 
 
To
07/12/2013 08:04:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01589509
Message ID:
01589527
Views:
58
thanks so much for this tamar. Works beautifully - what a time saver!
k

>>is there a way to access the UNREAD MAIL folder in outlook 2010 - I accept that this folder displays the contents for all folders in outlook but it would be very handy to access this instead of ritually going through the 1000's of read emails in the inbox before getting to the unread ones.
>>here is the code I am using to set this up #6 is traditionally the inbox
>>
>>tnx k
>>
>>
>>Local loOutlook   As Outlook.Application
>>Local loNameSpace As Outlook.NameSpace
>>Local loInBox     As Object
>>Local loMSG      As Outlook.MailItem
>>Local lnUnRead    As Integer
>>Local loAttach,llAttach
>>
>>#Define olFolderInBox      6
>>
>>loOutlook   = Createobject('Outlook.Application') &&
>>loNameSpace = loOutlook.GetNamespace("MAPI")
>>loInBox     = loNameSpace.GetDefaultFolder(olFolderInBox)
>>lnUnRead    = 0
>>
>>
>
>You can find out how many are unread by checking the UnreadCount property of the folder. To get the list of unread items, use the Restrict method with the parameter "[Unread] = true":
>
>
>loMsgs = loInbox.Items
>loUnread = loMsgs.Restrict("[Unread] = true")
>
>
>To mark an item as read, change its Unread property.
>
>Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform