I need to start an outlook session with a particular profile

This doesn't work.

The line
oNameSpace.Logon "MyProfile", , False, True
should force a new session usin MyProfile.

But if outlook is already running, it still uses the current profile.

what is going wrong?

Code:
Sub ReadEmail()
Dim oApp As Outlook.Application
Dim oNameSpace As Outlook.NameSpace
Dim oFolder As Outlook.MAPIFolder
Dim oMailItem As Object
Dim sMessage As String
Set oApp = New Outlook.Application
Set oNameSpace = oApp.GetNamespace("MAPI")

oNameSpace.Logon "MyProfile", , False, True


Set oFolder = oNameSpace.GetDefaultFolder(olFolderInbox)

.......
.......
......
ps don't bother telling me there's no End Sub!

------------------
Mark Sreeves
Analyst Programmer

[email protected]
A BMW Group Company