Read Exchange public folder using VStudio2005

new2vs

New member
Joined
Sep 11, 2010
Messages
1
Programming Experience
Beginner
Greetings Gurus & Geniuses,

Being WAY over my head with this idea I am appealing for help. I would like to find a method of reading the contents of a public folder into a database.

The environment:
1x Exchange 2007 server with a public folder which I will call foo
1x 2003 server with a SQLExpress 2005 database which I will call bar
3x Workstations running Access 2007

The plan:
Find the code which will run on the 2003 server that:-
1. reads the content of foo
2. push that information into the relevant fields either into a table in
Access or a table in bar
3. send a notification to the workstation in the form of a pop-up that displays on the screens which pop-up when acknowledged opens a form in the Access 2007 F/E

I have reviewed about 40 websites/forums with instructions on how to do this but have found that this either involves using "Redemption" (which I think requires Outlook installed - though I may be wrong on this), using WebDav or Webmail (which I would rather not do), have instructions for sending mail but not receiving it (this doesn't help) or uses the office.interops (which requires Outlook).

I had (with the help of other forum posters) set up an Outlook OTM which called the required Access form through an Access module but only found out after dozens of attemptss (including those listed on outlookcode.com) that moving OTM files is a pain in the unmentionables and very often impossible.

It was then decided that the code should run on bar calling new email and inserting it into the db and that is where I am stuck.

I have found this
VB.NET:
Dim goExchangeSession As New MAPI.Session() 
profileinfo = "Hyde" & vbLf & "EXNETUSER" 
'profileinfo = "Hyde" & vbLf & "Pranav.Chopra" 


Dim vEmpty As String 

goExchangeSession.Logon(, , False, False, 0, False, ) 

Dim oFolder As MAPI.Folder 
oFolder = CType(goExchangeSession.Inbox, MAPI.Folder) 

Dim oMsgs As MAPI.Messages = CType(oFolder.Messages, MAPI.Messages) 

Dim oFilter As MAPI.MessageFilter = CType(oMsgs.Filter, MAPI.MessageFilter) 
oFilter = oMsgs.Filter 
oFilter.Unread = False 


Dim oCount As String = oMsgs.Count.ToString 

Return oCount 

End Function
from Accessing MS Exchange Server through VB.NET - ASP.NET Forums but I have no idea which Imports, dependencies or References I need to get it to work in VStudio to talk to Exchange.

Any help would be appreciated.

Thank you for your time.
 
Back
Top