Is your database in a Trusted Location? Unless it is, Access will not run
VBA.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"James" <(E-Mail Removed)> wrote in message
news:304a15ce-2137-4472-bd00-(E-Mail Removed)...
>I have a VBA module that calls an Outlook Object, When run with MS
> Office 2007 I get an undefined variable error. Is MS 2007 deaf to
> VBA? The error occurs in the first line of the following code:
>
> Option Compare Database
> Option Explicit
>
> ' InitOutlook sets up ola and nsp.
> Private ola As Outlook.Application ----< Here with ola
> Private nsp As Outlook.NameSpace
>
> Can't get any response from MS