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

Posted on 2009-02-10
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 ( 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?
Question by:VikingEgil
    LVL 8

    Accepted Solution

    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.


    Author Comment

    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
    LVL 8

    Expert Comment

    Glad I could help.  Good Luck.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Find out how to use dynamic social media in email signatures with this top 10 DOs & DON’Ts.
    Use email signature images to promote corporate certifications and industry awards.
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now