Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Get SMTP Server from Outlook (http://www.outlookbanter.com/outlook-vba/50153-get-smtp-server-outlook.html)

Greg Lovern June 10th 07 06:20 PM

Get SMTP Server from Outlook
 
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


Michael Bauer [MVP - Outlook] June 11th 07 09:39 AM

Get SMTP Server from Outlook
 


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


Dmitry Streblechenko June 11th 07 06:52 PM

Get SMTP Server from Outlook
 
plug
Or you can do that using Redemption: RDOPOP3Account.SMTP_Server -
http://www.dimastr.com/redemption/rd...RDOPOP3Account
/plug

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

"Michael Bauer [MVP - Outlook]" wrote in message
.. .


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





All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com