Max Wanadoo
max.wanadoo at gmail.com
Mon Aug 3 14:35:03 CDT 2009
Right then young man (William): You have set me a challenge with this BGInfo but I think I am getting somewhere. Here are two CUSTOM VBS scripts that I have tested and work for me !! As Always, watch for word wrap. Feedback appreciated + some indication of how you wrote the vbscript for the clocks Max FIRST ONE: ' MyUnreadEmails.vbs 'Max Sherman - 3 Aug 09 - for BGInfo Const olFolderInbox = 6 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") objNamespace.Logon "Default Outlook Profile", , FALSE, TRUE Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox) Echo objFolder.UnreadItemCount SECOND ONE: ' MyOutlookDistributionLists.vbs 'Max Sherman - 3 Aug 09 - for BGInfo Const olFolderContacts = 10 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set colContacts = objNamespace.GetDefaultFolder(olFolderContacts).Items intCount = colContacts.Count For i = 1 To intCount If TypeName(colContacts.Item(i)) = "DistListItem" Then Set objDistList = colContacts.Item(i) Echo objDistList.DLName For j = 1 To objDistList.MemberCount echo objDistList.GetMember(j).Name & " -- " & objDistList.GetMember(j).Address Next Echo "" End If Next **END***