PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Re: opening Outlook with multiple profiles

Reply

Re: opening Outlook with multiple profiles

 
Thread Tools Rate Thread
Old 20-12-2006, 08:56 PM   #1
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: opening Outlook with multiple profiles


It shouldn't fail even with many profiles. I have 8 on my main development
machine for example. You should either open into the default profile or get
prompted as to which profile to open Outlook with.

Did you try CreateObject("Outlook.Application")?

Are you sure that something else isn't involved, such as a script stopper
from an A-V program or firewall that is preventing New or CreateObject from
working? Those are know to be able to do that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"judith" <judith@discussions.microsoft.com> wrote in message
news:92A3A78E-D528-4B88-ACDF-507103EA8BAD@microsoft.com...
>I am using
> Set olApp = New Outlook.Application
> but this seems to fail on a machine with multiple profiles. Any
> suggestions
> please


  Reply With Quote
Old 21-12-2006, 08:13 AM   #2
=?Utf-8?B?anVkaXRo?=
Guest
 
Posts: n/a
Default Re: opening Outlook with multiple profiles

I have tried turning off the firewall etc but this machine doesnt seem to
like it. It never gets past the first Outlook statement. Could it be anything
to do with loaded libraries. I have DAO and outlook loaded, should i try
anything else.

It is fine if I use a docmd.sendobject from Access though

Thanks

"Ken Slovak - [MVP - Outlook]" wrote:

> It shouldn't fail even with many profiles. I have 8 on my main development
> machine for example. You should either open into the default profile or get
> prompted as to which profile to open Outlook with.
>
> Did you try CreateObject("Outlook.Application")?
>
> Are you sure that something else isn't involved, such as a script stopper
> from an A-V program or firewall that is preventing New or CreateObject from
> working? Those are know to be able to do that.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "judith" <judith@discussions.microsoft.com> wrote in message
> news:92A3A78E-D528-4B88-ACDF-507103EA8BAD@microsoft.com...
> >I am using
> > Set olApp = New Outlook.Application
> > but this seems to fail on a machine with multiple profiles. Any
> > suggestions
> > please

>
>

  Reply With Quote
Old 21-12-2006, 02:45 PM   #3
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: opening Outlook with multiple profiles

All you need to automate Outlook is Outlook being installed and a reference
to that library in your VBA project. Even without the reference you can
still automate Outlook, you'd just have to use late binding.

The DoCmd.SendObject command doesn't directly use Outlook, it uses Simple
MAPI and that calls whatever the default MAPI provider is set to. It could
be Outlook, it could be Outlook Express, it could even be Eudora or any
other MAPI provider.

What error are you getting? Saying it fails really tells us nothing.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"judith" <judith@discussions.microsoft.com> wrote in message
news8B0E30D-E186-4C19-B3D0-C2A14E6EC692@microsoft.com...
>I have tried turning off the firewall etc but this machine doesnt seem to
> like it. It never gets past the first Outlook statement. Could it be
> anything
> to do with loaded libraries. I have DAO and outlook loaded, should i try
> anything else.
>
> It is fine if I use a docmd.sendobject from Access though
>
> Thanks


  Reply With Quote
Old 21-12-2006, 09:24 PM   #4
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: opening Outlook with multiple profiles

You get a 424 on code like this?

Dim olApp As Outlook.Application
Set olApp = New Outlook Application

or

Set olApp = CreateObject("Outlook.Application")

That would usually indicate that Outlook isn't correctly installed. If it
was an early binding reference problem then you'd get an error on the Dim
statement. If you get the error after the automation creation line it would
usually indicate that olApp was Nothing and something was preventing
creation of the object, such as a script stopper.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"judith" <judith@discussions.microsoft.com> wrote in message
news:1CA5DE74-370D-4F43-98BF-3DF9E0775A61@microsoft.com...
>I get Runtime error 424 object required if that helps
> thanks


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off