I'm trying to get a dynamic CDO profile to work. When I run the following
code, the LOGON method times out. The OUTBOX property then automatically
opens a profile window, which has the Server name correct, but the mailbox
name contains an "=" in front of it.
Does the PROFILEINFO parameter only work from web clients interacting with
IIS? Or can I run this straight from a visual basic application running
on the desktop? Any help would be appreciated.
The environment is:
Outlook 98 Client
The code is:
Dim objSession As MAPI.Session
Dim objOutbox As Folder
Dim objNewMessage As Message
Dim objRecipients As Recipients
Dim objOneRecip As Recipient
Set objSession = New MAPI.Session
objSession.Logon profileinfo:= "JOE_SERVER" & vbCrLf & "joew"
Set objOutbox = objSession.Outbox
Set objNewMessage = objOutbox.Messages.Add
Set objRecipients = objNewMessage.Recipients
Set objOneRecip = objRecipients.Add
.Name = "Joe Wichowski"
.Type = ActMsgTo
' Get MAPI to determine complete E-mail address.
.Subject = "Test VB"
.Text = "Test VB"