Google Answers Logo
View Question
 
Q: How to define Shortcuts in Outlook 2000? ( Answered 2 out of 5 stars,   3 Comments )
Question  
Subject: How to define Shortcuts in Outlook 2000?
Category: Computers > Software
Asked by: hpds-ga
List Price: $5.00
Posted: 29 Jun 2002 05:40 PDT
Expires: 29 Jul 2002 05:40 PDT
Question ID: 34844
Hi folks!

Does anybody know how to define a shortcut in Microsoft Outlook 2000?
I would like to increase the speed and the quality of my
e-mail-management. Therefore it would be very useful if I could omit
the time-consuming mouse-operations.

For example: I would like to hit "Strg+Shift+d" to move a message into
the
"done"-Folder.

Does anybody know how to configure things like that?

If you know the answer, please give me instructions how to define and
use those shortcuts. I am using MS Outlook XP right know.

Thanks a lot for your help.

Yours
Martin Seibert
m.seibert@homepage-design.net

Request for Question Clarification by gary-ga on 29 Jun 2002 08:01 PDT
you ask for help with Outlook 2000, but at the end say you are using
Outlook XP....which do you need help with?
Answer  
Subject: Re: How to define Shortcuts in Outlook 2000?
Answered By: gopalkamat-ga on 29 Jun 2002 11:13 PDT
Rated:2 out of 5 stars
 
Hi hpds-ga,

Microsoft has a name for creating such shortcuts in any Office
software (that includes Word, Excel, Access, Outlook, Powerpoint). 
That name is "macro".  You can create the shortcut you want by
creating a macro in Outlook, no matter what version of Outlook you
have - XP or 2000.  Once you create the macro, you can assign a
keystroke combination (also known as a shortcut) to it.

Hence, as for your example, you'll need to record a macro that moves a
message into the "Done" folder.  Then you should assign a shortcut to
it with the keystroke "Strg+Shift+d".  To achieve this, perform the
following steps:
1. Choose "Macro" and then "Record New Macro" from the "Tools" menu.
2. This opens up the Record Macro dialog box.
3. Give a name to your macro.  Call it "Move To Done".
4. Assign a shortcut key "Strg+Shift+d" to the macro and click Ok. 
This will start the macro recording.
5. Perform ONLY the actions that you want to be recorded.  
6. Press Alt+V+K to stop recording the macro.  
There, you should be all done.  You can always 'replay' or invoke the
macro by pressing the Strg+Shift+d combination.

To learn more about macros, go through this tutorial I found on the
PCWorld website.  This tutorial gives you basics on macros and shows
you how to get started with them:
http://www.pcworld.com/howto/article/0,aid,73644,tk,xpx,00.asp

I also found another good article on macros at the Microsoft Office
Assistance Center here:
http://office.microsoft.com/assistance/2002/articles/pwRecordingMacros.aspx

These articles should help you master the process of recording your
own macros and assigning keystrokes or toolbar buttons to them.

Have fun speeding up your work! :)

Regards,
gopalkamat-ga

Request for Answer Clarification by hpds-ga on 29 Jun 2002 11:39 PDT
Hi gopalkamat-ga!

I'm sorry, but I could not follow your Steps the way you described
them.

- I cannot assign a "Shortcut" to the macro.
- If I create a new macro, the Microsoft Visual Basic Application
Pops-Up and tries to make me program what I want.
But my Visual Basic-Skills are not even poor. They are non-existant.
Unfortunately there is no "Record macro"-Button either.
- I tried to "record macros" with MS Word and MS Excel. That worked
perfect. But the "Record"-Button in these programs does not exist in
my Version of MS Outlook.
- I even tried to lower the "security" for the execution of macros.
That did not help either.

On the way to a solution:
1. Could you please record the described macro and post the visual
Basic - Source Code for it?
2. Do you know what I need to do, to get this "record"-button in my
Outlook-Version? Is there any further installation, update or service
release needed?

Thank you for your help.

Ciao
Martin

Clarification of Answer by gopalkamat-ga on 29 Jun 2002 12:18 PDT
Hpds-ga,

What version of Outlook are you using, may I ask ?

Regards.

Request for Answer Clarification by hpds-ga on 29 Jun 2002 14:37 PDT
I am using Microsoft Outlook XP. The Program says: "Microsoft Outlook
2002 (10.3513.3501) SP-1"

Clarification of Answer by gopalkamat-ga on 30 Jun 2002 05:15 PDT
I am afraid you won't see the "Record a Macro" button in Outlook for
XP.  You'll have to manually go into the Visual Basic Editor and write
the VBA (Visual Basic for Applications) code to get this done.

There's certain websites that will help you get trained with VBA. 
Take a look at them:
http://www.outlookvba.com/
http://www.slipstick.com/dev/vb.htm
http://www.intelinfo.com/newly_researched_free_training/Visual_Basic_for_Applications_VBA.html

Unfortunately, I tried to search for the exact piece of code that you
were asking for (moving a message to a particular folder) but could
not find it anywhere.  The first website mentioned above has some code
snippets which you might be able to modify and use.  Check them out.

Thanks,
gopalkamat-ga
hpds-ga rated this answer:2 out of 5 stars
As you tried your very best, I am willing to pay for the answer. But
it is kind of poor to recommend 3 ressources for learning VB-Script.
But I also know, that it might not be your task to tell me the code
for 5 bucks. But as I know from my colleagues, there is no "record
macro" - button in outlook at all.

Comments  
Subject: Re: How to define Shortcuts in Outlook 2000?
From: wildlatin23-ga on 26 Apr 2004 12:40 PDT
 
Here is one 'official word' on why no Outlook Macro Record function... FYI.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;234690

Of course, it sucks mucho because we cannot use the RECORD feature to
experiment in VBA and get a base for coding...

ANYONE know if this has changed with Office 2003 ???
Subject: Re: How to define Shortcuts in Outlook 2000?
From: stuartleitch-ga on 27 Jun 2004 19:24 PDT
 
Here is a script that does the trick.


Option Explicit
' CREATED BY DUCKY SHERWOOD April 2001
' Original at http://www.webfoot.com/oeo/outlook/vb/OEOmacros.txt

' Move the selected message(s) to the "done" folder. ************************
Sub MoveToDone()
    ' Be sure to change the name of the "done" folder to the name of
    ' *your* "done" folder.
    MoveToFolder ("zz-Done")
End Sub

' Move the selected message(s) to the "to-do" folder. ***********************
Sub MoveToToDo()
    ' Be sure to change the name of the "to-do" folder to the name of
    ' *your* "done" folder.
    MoveToFolder ("aa-ToDo")
End Sub

' This sends an Up arrow and Alt-Up arrow key to Outlook.
' Up arrow moves the message selection bar up one when the list of
' messages is selected; Alt-Up does the same if a message is
' selected in the Preview pane.  This is a bit of a kludge --
' it sends an two keystrokes when only one is needed -- but the extra
' keystroke doesn't seem to cause any bad side-effects.  Furthermore, it
' is really difficult to figure out which of the preview pane and message
' list is active.
Sub MessageUp()
    SendKeys "{UP}", True
    SendKeys "%{UP}", True
End Sub

' Same as MessageUp, but with Down arrows instead.
Sub MessageDown()
    SendKeys "{DOWN}", True
    SendKeys "%{DOWN}", True
End Sub

' Returns TRUE if a folder named folderName is a child of the folder
' named parentFolder, FALSE otherwise.  Note that if folderName is in
' a SUBfolder, this will return FALSE.
Function FolderExists(parentFolder As MAPIFolder, folderName As String)
    Dim tmpInbox As MAPIFolder
    
    On Error GoTo handleError
    ' If the folder doesn't exist, there will be an error in the next
    ' line.  That error will cause the error handler to go to :handleError
    ' and skip the True return value
    
    Set tmpInbox = parentFolder.Folders(folderName)
    FolderExists = True
    Exit Function
handleError:
    FolderExists = False
End Function

' Move the selected message(s) to the given folder **************************
Function MoveToFolder(folderName As String)

    Dim myOLApp As Application
    Dim myNameSpace As NameSpace
    Dim myInbox As MAPIFolder
    Dim currentMessage As MailItem
    Dim errorReport As String
    
    
    ' Housekeeping: set up the macro environment
    Set myOLApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOLApp.GetNamespace("MAPI")
    Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)

    ' See if the folder exists.  If it doesn't, print an informational
    ' error.
    If Not FolderExists(myInbox, folderName) Then
        MsgBox "Folder " & folderName & " does not exist." & _
            vbNewLine & vbNewLine & _
            "Please either: " & vbNewLine & vbNewLine & vbTab & _
            "create the folder " & folderName & " under Inbox" & vbNewLine & _
            "or" & vbNewLine & vbTab & _
            "change the name of the folder in the Visual Basic code " & _
            "that you downloaded.  (The name of the folder is well marked, " & _
            "near the beginning of the code.)"
       Exit Function
    End If

    ' Figure out if the active window is a list of messages or one message
    ' in its own window
    On Error GoTo QuitIfError    ' But if there's a problem, skip it
    Select Case myOLApp.ActiveWindow.Class
        ' The active window is a list of messages (folder); this means there
        ' might be several selected messages
        Case olExplorer
            ' Move the selected messages to the "done" folder
            For Each currentMessage In myOLApp.ActiveExplorer.Selection
                currentMessage.Move (myInbox.Folders(folderName))
            Next
             
        ' The active window is a message window, meaning there will only
        ' be one selected message (the one in this window)
        Case olInspector
            ' Move the selected message to the "done" folder
            myOLApp.ActiveInspector.CurrentItem.Move (myInbox.Folders(folderName))
        ' can't handle any other kind of window; anything else will be ignored
    End Select
    
QuitIfError:       ' Come here if there was some kind of problem
    Set myOLApp = Nothing
    Set myNameSpace = Nothing
    Set myInbox = Nothing
    Set currentMessage = Nothing
End Function
Subject: Re: How to define Shortcuts in Outlook 2000?
From: stuartleitch-ga on 27 Jun 2004 19:55 PDT
 
Script above tweaked:

Option Explicit
' CREATED BY DUCKY SHERWOOD April 2001
' Original at http://www.webfoot.com/oeo/outlook/vb/OEOmacros.txt

' Modified by Stuart Leitch June 2004 (www.stuartleitch.com)
' Reduced to one Sub, Marks each email as read.

' How to Assign a Macro to a Shortcut Key to Outlook (Not Obvious):
' http://support.microsoft.com/default.aspx?scid=kb;EN-US;252427

' Move the selected message(s) to the "done" folder. ************************
Sub MoveToDone()
    
    ' Be sure to change the name of the "MoveToFolder" folder to the name of
    ' *your* "done" folder.
    Dim MoveToFolder As String
    MoveToFolder = "AA Processed"
    
    
    Dim myOLApp As Application
    Dim myNameSpace As NameSpace
    Dim myInbox As MAPIFolder
    Dim currentMessage As MailItem
    Dim errorReport As String
    
    
    ' Housekeeping: set up the macro environment
    Set myOLApp = CreateObject("Outlook.Application")
    Set myNameSpace = myOLApp.GetNamespace("MAPI")
    Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)

   
    ' Figure out if the active window is a list of messages or one message
    ' in its own window
    On Error GoTo QuitIfError    ' But if there's a problem, skip it
    Select Case myOLApp.ActiveWindow.Class
        ' The active window is a list of messages (folder); this means there
        ' might be several selected messages
        Case olExplorer
            ' Move the selected messages to the "done" folder
            For Each currentMessage In myOLApp.ActiveExplorer.Selection
               currentMessage.UnRead = False
               currentMessage.Move (myInbox.Folders(MoveToFolder))
            Next
             
        ' The active window is a message window, meaning there will only
        ' be one selected message (the one in this window)
        Case olInspector
            ' Move the selected message to the "done" folder
            currentMessage.UnRead = False
            myOLApp.ActiveInspector.CurrentItem.Move
(myInbox.Folders(MoveToFolder))
        ' can't handle any other kind of window; anything else will be ignored
    End Select
       
QuitIfError:       ' Come here if there was some kind of problem
    Set myOLApp = Nothing
    Set myNameSpace = Nothing
    Set myInbox = Nothing
    Set currentMessage = Nothing
End Sub

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy