Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Outgoing E-mail Folder

Status
Not open for further replies.

TexasKen

Technical User
Nov 29, 2010
4
0
0
US
I am trying to write a Macro that saves outgoing e-mail to my “FollowUp” folder instead of my “Sent Items” folder. After opening a New E-mail, the following code compiles & runs, but does not change my outgoing e-mail from Sent Items to FollowUp.

I have changed the Set objFolder code to
Set objFolder = objNS.GetDefaultFolder(olFolderFollowUp)
but then I get a “One or more parameters are not valid” message. Can someone please help me solve this code.


Sub Folder2()
Dim appOut As Outlook.Application
Dim objFolder As Outlook.MAPIFolder
Dim objNS As NameSpace
Set appOut = CreateObject("Outlook.Application")
Set objNS = Application.Session
Set objFolder = objNS.GetDefaultFolder(olFolderInbox)
Set SaveSentMessageFolder = objFolder
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top