• Subject: Can't even capture if Outlook is running
  • Author: Lester Lane
  • Date: 19 Oct 2010
  • References:
Hi,
I have upgraded to 2010 and when Access is running my code it won't
even detect if Outlook 2010 is running nor will
it create a new instance (failed with a 429 - ActiveX can't create
error).

I also remember that using 2010 one can pick an account to send
through and I
guess the whole routine could be made slicker. I'm at a loss even
using the "help" screens. Thanks.

Dim objOutlook As Object ' Note: Must be late-binding.
Dim objNameSpace As Object
Dim objExplorer As Object
Dim blnSuccessful As Boolean
Dim blnNewInstance As Boolean
Dim strFailed As String
Dim i As Integer

'Is an instance of Outlook already open that we can bind to?
On Error Resume Next
Set objOutlook = GetObject(, "Outlook.Application") ==== fails to find
running program
On Error GoTo ErrTrap

If objOutlook Is Nothing Then

'Outlook isn't already running - create a new instance...
Set objOutlook = CreateObject("Outlook.Application") ==== fails
with 429 can't create error
blnNewInstance = True
'We need to instantiate the Visual Basic environment... (messy)
Set objNameSpace = objOutlook.GetNamespace("MAPI")
Set objExplorer =
objOutlook.Explorers.Add(objNameSpace.Folders(1), 0)
objExplorer.CommandBars.FindControl(, 1695).Execute

objExplorer.Close

Set objNameSpace = Nothing
Set objExplorer = Nothing

End If
........ more code .......

I also had some code in Outlook 2003 that allowed me to bypass the
annoying messages when I sent emails from Access 2003. Do I still
need this or has Outlook improved since 2003 re thinking it is under
attack?!
19 Oct 2010Can't even capture if Outlook is running.Lester Lane
19 Oct 2010|- Re: Can't even capture if Outlook is running.Ken Slovak
20 Oct 2010|  \ Re: Can't even capture if Outlook is running.Lester Lane
20 Oct 2010|     \ Re: Can't even capture if Outlook is running.Ken Slovak
20 Oct 2010|        \ Re: Can't even capture if Outlook is running.Tony Toews
21 Oct 2010|           \ Re: Can't even capture if Outlook is running.Ken Slovak
21 Oct 2010|              \ Re: Can't even capture if Outlook is running.Tony Toews
20 Oct 2010\ Re: Can't even capture if Outlook is running.Bruno Campanini
Contact Us
All times are in (US) Eastern Daylight Time (GMT -4:00)