Automation Outlook Express

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I'd like to read mails from Access(VBA). In order that I can do it I
have to establish a reference to Outlook's object library, but I can't find
any appropriate library. I 've found only Outlook express 5.0 type library.
Why? What can I do to have an appropriate one?
My Environment:
W98SE
Office XP
Access 2002
I have outlook Express 6
 
flogyu said:
Hello, I'd like to read mails from Access(VBA). In order that I can do it I
have to establish a reference to Outlook's object library, but I can't find
any appropriate library. I 've found only Outlook express 5.0 type library.
Why? What can I do to have an appropriate one?
My Environment:
W98SE
Office XP
Access 2002
I have outlook Express 6

Outlook Express doesn't expose an automation interface. You'd need to use
Outlook.
 
That's the object library for Outlook, not Outlook Express. Outlook Express
cannot be automated.
 
Right. My interpretation of the original post was that "flogyu" actually
wanted to automate Outlook but was trying to use Outlook Express because
"flogyu" could not find the right library for Outlook.
 
Hi,

There is a little exemple but functionnal. I did not need special reference.

Sub Mail_CDO()
Dim iMsg As Object
Dim iConf As Object
Dim iBP
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.BCC = "(e-mail address removed)"
.From = """Real"" <[email protected]>"
.Subject = "exemple"
.TextBody = "Hi there"
Set iBP = iMsg.AddAttachment("c:\tempo\a.txt")
.send
End With

Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
End Sub
 
What reference libraries do I need to make this work? I tried the code and
modified the parts that I can figure out but I can't get it to work. Also
does this bypass the security macros that Outlook 2002 that requires the user
interaction to allow the email to be sent? Thanks.
 
That code's using Late Binding, so no reference should be required. However,
you must have CDO installed on the machine. What operating system are you
using?
 
I am running NT 4.0 but will soon be migrating to windows XP within the next
2 weeks. Also switching over from Access 2000 to Access 2003 as well.
 
AFAIK, NT doesn't support CDO: I believe it was introduced in Windows 2000.
Wait until you've got WinXP, and see whether it works then.
 
Douglas J. Steele said:
AFAIK, NT doesn't support CDO: I believe it was introduced in Windows 2000.
Wait until you've got WinXP, and see whether it works then.

Win2K introduced CDOSys (don't know the version that MS assigned to this), but
CDO in one form or another works in all Windows versions. The issue before
Win2K is whether it is installed. I think Win2K was the first Windows version
that included it as part of the OS. Prior to that it was usually installed by
Outlook or similar.
 
Back
Top