Get SMTP Server from Outlook

  • Thread starter Thread starter Greg Lovern
  • Start date Start date
G

Greg Lovern

I have an Excel VBA macro that sends mail using CDO. Works fine, but
users have to enter their SMTP Server in a designated cell.

Most of the users are using Outlook. Can I get the SMTP Server name
from Outlook by automating Outlook?


Thanks,

Greg
 
It's in the registry. For Outlook 2003 e.g. it's:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\[Profile]\9375CFF0413111d3B88A00104B2A6676\

In the subkeys you have to search for the specific account name and read the
SMTP Server property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sun, 10 Jun 2007 09:20:39 -0700 schrieb Greg Lovern:
 
<plug>
Or you can do that using Redemption: RDOPOP3Account.SMTP_Server -
http://www.dimastr.com/redemption/rdo/RDOAccount.htm#RDOPOP3Account
</plug>

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Michael Bauer said:
It's in the registry. For Outlook 2003 e.g. it's:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles\[Profile]\9375CFF0413111d3B88A00104B2A6676\

In the subkeys you have to search for the specific account name and read
the
SMTP Server property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:

<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sun, 10 Jun 2007 09:20:39 -0700 schrieb Greg Lovern:
I have an Excel VBA macro that sends mail using CDO. Works fine, but
users have to enter their SMTP Server in a designated cell.

Most of the users are using Outlook. Can I get the SMTP Server name
from Outlook by automating Outlook?


Thanks,

Greg
 
Back
Top