
Problem with session.login method, not authenticating
From within vb using outlook 2000 , the following code does not authentic
'Start Outlook. If it is already running, you'll use the same instance.
Dim olApp As Outlook.Application
Dim olNs As Outlook.NameSpace
Dim olFolder1 As MAPIFolder
Dim obj As CdoObjectClass
Set olApp = CreateObject("Outlook.Application")
'Logon. Doesn't hurt if you are already running and logged on...
Set olNs = olApp.GetNamespace("MAPI") olNs.Logon "ISS
SMC", "password"
'open ISS SMC Mailbox'
Set fldMain = olNs.Folders("Mailbox - ISS SMC")
differnet way that does the same thing:
Dim strEntryID As String
Dim strStoreID As String
Dim objSession As MAPI.Session
Dim objCDOItem As MAPI.message
' get EntryID and StoreID for message
strEntryID = objMsg.EntryID
strStoreID = objMsg.Parent.StoreID
' start CDO session
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "ISS SMC","password"
if I have Outlook open , it will work, if not it does not authentic, so I
cannot set the folder..
any help
Maarten