We help IT Professionals succeed at work.

How can I make a macro in Outlook 2007 to change the smtp address and port?

Medium Priority
Last Modified: 2012-08-14
When I am at work, there is a company policy saying that we can only use a specific smtp server (yoda.akershus-fk.no). This smtp server however, can only be used at work.
At home I am using another smtp server, the one my DSL provider is providing me.
This smtp server also have a different port.

Changing between these settings everytime I need to check my mail at work or outside work, is not very practical, and this is the same for everyone who works here.

So what I need to make, is two simple macro buttons, one that sets the company smtp server and port 25, and one that sets whatever settings the person needs to use outside of work.

I can not find any option to "record a macro" in outlook, like theres is in Excel etc, so i figure I have to use visual basic? But I have no idea how to manipulate outlook settings from VB, I have only been using it in access. Anyone with insight in this?
Watch Question

I'm not sure that what you're asking can be done without some low-level programming and api's and all kinds of other stuff I have no experience in.  However, I came across this link and think it may be helpful to you.



Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Actually, I have good experience with using .prf files and office resource kit in general, so that is an excellent idea :) should have thought of it myself :p

Glad I could help.  Good Luck.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.