Set As Default Profile not working

T

Tatakau

I have a macro in Access that sends a report to an e-mail address via
Outlook. When I run the macro, it pops up a box titled "Choose Profile". A
drop-down box lists the available profiles, and a button next to it allows
you to create a new profile. A checkbox under an 'options' button can be
checked to set a profile as the default profile.

However, checking this box doesn't make any difference - when I run the
macro again, even after checking the box, it asks me to choose a default
profile.

I run the macro via a scheduled task at night when everyone has gone home.
However, with this box for choosing a default profile popping up without
fail, the report will never be sent without someone being here.

Is there a fix for this, maybe via editing the registry or changing settings
somewhere?

Thanks,

Nick
 
S

Sue Mosher [MVP-Outlook]

It might be helpful if you posted the code that shows how you're accessing Outlook in your macro. Also, did you look in Control Panel | Mail to see whether the user's machine is set to prompt for a profile?
 
T

Tatakau

A scheduled task runs a macro with the following command:
C:\Progra~1\Micros~2\Office\MSACCESS.EXE M:\Nick\prototype.mdb /x
DailyReport

The macro for DailyReport is set up like this:
1===Action: SendObject
Type: Report
Name: DailyReport
Format: RTF
To: (e-mail address removed)
Subject: Daily Report
Message Text: Here is today's report!
Edit Message: No
All other fields: Blank
2===Action: Close Access

The problem is that Access will ask for a default profile when the macro
attempts to send the report, which completely undermines the whole automation
idea. Checking the "Use as default profile" box does not do any good - it
still asks for a default profile the next time the macro is run.

I am running Windows XP Pro with SP2, and Office 2000.

Thanks,

Nick
 
S

Sue Mosher [MVP-Outlook]

Did you check Control Panel | Mail as I suggested? Since you're not actually automating Outlook directly but instead are using Simple MAPI to use the computer's default mail program, it may be a moot point, but you really should check the user's "prompt for profile" setting.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
T

Tatakau

Checking Control Panel>Mail opens a window labled "MS Exchange Settings
Properties" with three tabs: Services, Delivery, and Addressing.

* The Services tab lists the services set up for the profile (MS Exchange
Server & Otlook Address Book). There are buttons for Add, Remove,
Properties, Copy, and About for manipulating profiles. There is also a
button called Show Profiles.

* The Delivery tab allows you to select where incoming mail is delivered,
and list the services that process recipient addresses (MS Exchange Transport
& MS Exchange Remote Transport).

* The Addressing tab lets you select which address list is shown first,
where to keep personal addresses, and where to check for address first when
sending mail.

If I click on the Show Profiles button from the first tab, I get the Mail
window:

* The Mail window has only one tab - General. It lists the profiles set up
on the computer, and allows you to add, remove, check the properties of, or
copy a profile. Clicking the properties button brings you back to the "MS
Exchange Settings Properties" window I talked about earlier. A very vicious
circle.

None of these tabs or windows indicate an option to "Prompt for Profile",
and navigating the buttons inside the tabs doesn't really get me anywhere.
Checking the detailed properties of the Microsoft Exchange Server doesn't
help either.

Are there more detailed instructions on how to get to a "Prompt for Profile"
option?

Nick
 
S

Sue Mosher [MVP-Outlook]

Sorry -- I wasn't thinking about Outlook 2000.

In Outlook, under Tools | Options, go to the Mail Services tab. At the top, you should see a choice of options for "Prompt for a profile to be used" and "Always use this profile."

In any case, I'm not sure that it will matter, since you're not automating Outlook itself directly. The profile prompt may be a side effect of using simple MAPI.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
T

Tatakau

The right options are already set... looks like it's not fixable. At least
with Office 2000...

Outlook doesn't ask for a profile if you just start it manually, so that
kinda has me wondering why it does when Access tries to open it. I've
managed to jury-rig a solution though. If Outlook is open and Access runs
the macro, it'll go off without a hitch. I suppose I can deal with it though.

Thank you so much for your help with this issue!

Nick
 
S

Sue Mosher [MVP-Outlook]

As I've tried to explain, Access isn't trying to open Outlook at all, not directly. It is invoking the default mail program for your machine. How Windows calls Outlook is pretty much out of your hands.

Maybe you could include code in your routine to start Outlook if it's not already running and use the Namespace.Logon method to load the desired profile.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top