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

x
?
Solved

macro or keyboard shortcut in outlook 2007

Posted on 2009-02-10
3
Medium Priority
?
708 Views
Last Modified: 2012-05-06
I'm looking for a way to map a key on my keyboard to automatically move whatever email I am viewing to a specific folder.
0
Comment
Question by:meixell
  • 2
2 Comments
 
LVL 8

Accepted Solution

by:
stehardy88 earned 2000 total points
ID: 23606939
You have to write a macro, assign a button on the toolbar, and then assign a shortcut to the button.
 
 For instance, to send the currently open email to the folder, create the macro:
 
 
 Sub MoveOpenMail()
     Dim oc As Object
     Dim myolApp As Outlook.Application
     Dim myNamespace  As Outlook.NameSpace
     Dim InboxFolder As MAPIFolder
     Dim DoneFolder As MAPIFolder
     Set myolApp = CreateObject("Outlook.Application")
     Set myNamespace = myolApp.GetNamespace("MAPI")
     Set InboxFolder = myNamespace.GetDefaultFolder(olFolderInbox)
     Set MoveToFolder = InboxFolder.Folders("FOLDERNAME")
     Set oc = Application.ActiveInspector.CurrentItem
 
     Select Case oc.Class
         Case olMail
             Set objMailItem = oc
             objMailItem.Move MoveToFolder
     End Select
 End Sub
 
 The code checks that the item is in fact a Mail item, and does not work for the currently selected item, but the currently open item.
0
 
LVL 8

Assisted Solution

by:stehardy88
stehardy88 earned 2000 total points
ID: 23606945
Alternativy follow: http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_24013716.html to create the macro, then assign a button on the toolbar, and then assign a shortcut to the button.

Ste
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

578 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