Sending Mail via Outlook

  • Thread starter Thread starter Phil Hellmuth
  • Start date Start date
P

Phil Hellmuth

I've written vba code to send mail via Outlook, but when running the
code, the code interrupts to prompt the user to choose an Outlook
profile. Is there a way to bypass this prompt, and go with the default
profile?

Thanks in advance.
 
I've written vba code to send mail via Outlook, but when running the
code, the code interrupts to prompt the user to choose an Outlook
profile. Is there a way to bypass this prompt, and go with the default
profile?

Thanks in advance.

Try Express ClickYes

Express ClickYes is a handy tool that runs in the system tray
automatically clicks the Yes button for the Outlook Security security
prompt, that asks you to confirm mail sending from third party
applications. If you are using a program that causes Outlook to
generate the prompt, you ll find this tiny tool very handy.
 
Probably a better question for an Outlook forum. Have you tried Namepace
CurrentUser.

Dim ol As Outlook.Application
Dim ns As Outlook.Namespace
Dim mi As Outlook.MailItem
Dim strUsr As String

Set ol = CreateObject("Outlook.Application")
Set ns = ol.GetNamespace("MAPI")
strUsr = ns.CurrentUser
ns.Logon strUsr, "", False, False
Set mi = ol.CreateItem(olMailItem)
mi.Display
 

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

Back
Top