link to Outlook inbox issus- "content unread" field is not working (1 Viewer)

cursedeye

Registered User.
Local time
Today, 04:05
Joined
Oct 7, 2009
Messages
50
I'm linking Access to Outlook, the system automatically generated a
link table called "inbox" which I can't modify anything inside, seems
like a 'read-only' table which shows emails' information in Outlook
"inbox" folder.

The very last field in the "inbox" table is called "content unread" is not working for me. It doesn't show me anything but blank even it is an unread email. I'm not sure where went wrong.Can anyone tell me how to fix it?
 

HiTechCoach

Well-known member
Local time
Today, 02:05
Joined
Mar 6, 2006
Messages
4,357
What version, including the SP update, of Access and Outlook are you using?
 

cursedeye

Registered User.
Local time
Today, 04:05
Joined
Oct 7, 2009
Messages
50
I've tried on 2 different computers, both have this issue.

1. XP sp 3, Office 2003
2 Vista SP1 Office 2007
 

cursedeye

Registered User.
Local time
Today, 04:05
Joined
Oct 7, 2009
Messages
50
any suggestion?

I've been trying to fix this for 2 days:confused::confused::confused:
 

HiTechCoach

Well-known member
Local time
Today, 02:05
Joined
Mar 6, 2006
Messages
4,357
I normally do not link to the inbox. I use VBA code to read the inbox.

Code:
Public Function UnreadMessagesInInbox() As Long
'*****************************************
'RETURNS:  Unread messages in the inbox on the local system,
'          or 0 if an error occurs

'REQUIRES: Outlook and Outlook Object Library

'          Application must have reference to
'          Outlook Object Library

'NOTES:     Same technique can be used to
'           Retrieve unread messages in other
'           Folders.  Just pass a diferent
'           parameter to GetDefaultFolder, or
'           Identify the folder by name using
'           The MAPIFolder's Folders collection.
'           Refer to documentation or other examples
'           on FreeVBCode.com for more detail
'******************************************

Dim oOutlook As Outlook.Application
Dim oNs As Outlook.NameSpace
Dim oFldr As Outlook.MAPIFolder

On Error GoTo ErrorHandler

Set oOutlook = New Outlook.Application
Set oNs = oOutlook.GetNamespace("MAPI")
Set oFldr = oNs.GetDefaultFolder(olFolderInbox)
UnreadMessagesInInbox = oFldr.UnReadItemCount

ErrorHandler:
Set oFldr = Nothing
Set oNs = Nothing
Set oOutlook = Nothing

End Function


Hope this heps ...
 

Users who are viewing this thread

Top Bottom