Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2009-02-10
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?
Question by:VikingEgil
  • 2

Accepted Solution

dds110 earned 2000 total points
ID: 23600539
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

ID: 23600654
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

Expert Comment

ID: 23600842
Glad I could help.  Good Luck.

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have had my own IT business for a very long time. I started mostly with hardware and after about a year started to notice a common theme. I had shelves with software boxes -- Peachtree, Quicken, Sage, Ouickbooks -- and yet most of my clients were…
Beware when using the ListIndex and the Column() properties of a listbox in Access 2007.  A bug has been identified in the Access 2007 listbox code which can cause the .ListIndex property to return a -1, and the .Columns(#) property to return a NULL…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

581 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