Macro to Go to Junk Email Folder


V

Victor Delta

I wonder if anyone can help with this please. I'm using Outlook 2003 and
would like to add another button to the main toolbar which enables me to go
to (view) the Junk Email folder - just as if clicking on the folder name in
the Folder List on the LHS. I already have a 'Go Inbox' button (using the
customise feature) which enables me to go straight to the Inbox and would
like to be able to do the same with the Junk Email folder. I frequently need
to switch between the two folders.

Sadly the preset option does not exist so presumably I need a macro to do
the job. Can anyone help with this please?

Many thanks.
 
Ad

Advertisements

M

Michael Bednarek

I wonder if anyone can help with this please. I'm using Outlook 2003 and
would like to add another button to the main toolbar which enables me to go
to (view) the Junk Email folder - just as if clicking on the folder name in
the Folder List on the LHS. I already have a 'Go Inbox' button (using the
customise feature) which enables me to go straight to the Inbox and would
like to be able to do the same with the Junk Email folder. I frequently need
to switch between the two folders.

Sadly the preset option does not exist so presumably I need a macro to do
the job. Can anyone help with this please?

This VBA code works for me:

Sub GotoJunk()
Set ActiveExplorer.CurrentFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderJunk)
End Sub
 
Ad

Advertisements

V

Victor Delta

"Michael Bednarek" wrote in message

I wonder if anyone can help with this please. I'm using Outlook 2003 and
would like to add another button to the main toolbar which enables me to go
to (view) the Junk Email folder - just as if clicking on the folder name in
the Folder List on the LHS. I already have a 'Go Inbox' button (using the
customise feature) which enables me to go straight to the Inbox and would
like to be able to do the same with the Junk Email folder. I frequently
need
to switch between the two folders.

Sadly the preset option does not exist so presumably I need a macro to do
the job. Can anyone help with this please?

This VBA code works for me:

Sub GotoJunk()
Set ActiveExplorer.CurrentFolder =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderJunk)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top