Changing Folder in a macro in Outlook.

Ste_Moore01

Active Member
Joined
Jul 13, 2005
Messages
467
Hi guys,

I'm trying to make a macro that will select another folder in Outlook.

This is somewhat difficult as we cannot record a macro, so I'm trying to make it manually.

Does anyone know how to select a different folder in Outlook in a macro?

For example, when the macro runs it opens my Sent Items when I'm in the Inbox?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
This code will activate the sent items folder.

Sub test()
Me.ActiveExplorer.SelectFolder Me.Session.GetDefaultFolder(olFolderSentMail)
End Sub

HTH
Cal
 
Upvote 0
Thanks for the reply, but this doesn't work for me.

It brings up an error message saying "Run-time error '438': Object doesn't support this property or method"
 
Upvote 0

Forum statistics

Threads
1,224,876
Messages
6,181,521
Members
453,050
Latest member
Obil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top