Difference between revisions of "Outlook"
Line 246: | Line 246: | ||
===Archive Now=== |
===Archive Now=== |
||
− | The ''Archive Now'' macro better mimic the expected behavior of the ''Archive Selected Items'' of Lotus Notes |
+ | The ''Archive Now'' macro better mimic the expected behavior of the ''Archive Selected Items'' of Lotus Notes (I never thought I would like to mimic anything from Lotus Notes,...) This ''Archive Now'' macro moves the selected mails in the same sub-folder as its original location. Note that the archive operation does not depend on any time and date information. All selected mails (and mails only) will be archived/moved. |
− | <br>'''Note''': in this version |
+ | <br>'''Note''': in this version the destination folder MUST exist. Folder(s) creation is part of the TODO list. Hint: you can run an AutoArchive command to get the folders created. |
<br>'''Note''': you may need or want to change the destination name (ie: ''"Archive Folders"'') |
<br>'''Note''': you may need or want to change the destination name (ie: ''"Archive Folders"'') |
||
Revision as of 17:49, 14 October 2008
A page about Outlook on this wiki? Sounds weird isn't it?
Well, blame my employer.
We migrated from Lotus Notes, with crappy hacked outdated client so Outlook is still better but...
At least under Lotus Notes it was possible to add an IMAP account (BTW Lotus Notes crashed quite often when talking IMAP...)
Here: Tools->Account Settings->This feature has been disabled by your system administrator
References
- Microsoft Office 2007 Resource Kit (official documentation from Microsoft)
- Documentation page
- Administrative template (ADM,ADMX,...) files
- Use 7-zip to decompress this file without installing it. Don't miss the summary excel sheet inside.
- Configuring Microsoft Outlook 2003, By Sue Mosher, Robert Sparnaaij, Charlie Pulfer, David Hooker.
- Excellent book for administering Outlook 2003. Content can be browsed/searched on Google Books.
- Excellent 3rd party page on Outlook policy: http://www.howto-outlook.com/howto/policies.htm
- Folder with interesting policy settings on Outlook [1].
Unlocking
Main registry keys
Apparently important registry keys are under:
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook
Some tips here (french)
IMAP settings
We can remove the admin barrier on account management:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Setup\ModifyAccounts =0
Another way without modifying the Registry is to use the import feature:
If e.g. Outlook Express client is also present on the Windows machine
- In Outlook Express:
- Wizard -> typed my IMAP&SMTP settings
- In Outlook:
- File -> Import and Export... -> Import Internet Mail Account Settings -> Microsoft Outlook Express or Microsoft Windows Mail -> Wizard allowing to edit the imported settings :-)
- Then write a new mail -> Account (below Send button) -> select your new account -> Send test mail -> Prompted to choose the sent folder, ok -> you've a multiple tabs config view of your new account, possibility to switch servers to TLS, changing name of the account, saying you need auth to talk to your SMTP etc etc
- If you need to tune IMAP settings later, go to registry and reset key (000000NN must be replaced with the number of your IMAP profile)
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\000000NN\IMAP Sentitems = 0
Note that I also tried importing from Eudora Light & Eudora but Outlook didn't see anything
Cached Exchange Mode
The following keys were set in my configuration, preventing to change the settings related to Cached Exchange Mode. In particular the mode selection was disabled, ie. the options Download full items, Download headers and then full items, Download headers were all grayed out.
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Cached Mode]
"CachedExchangeMode"=dword:00000001
"Enable"=dword:00000001
"NoDrizzle"=dword:00000001
"NoFullItems"=dword:00000001
"NoHeaders"=dword:00000000
"NoManualOnlineSync"=dword:00000001
"SyncPFFav"=dword:00000001
To unlock all settings, and eg. allow download full headers, simply delete values CachedExchangeMode, NoDrizzle, NoFullItems, NoHeaders, and NoManualOnlineSync (ie. all but Enable and SyncPFFav).
Changing JunkMail levels
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Options\Mail\JunkMailProtection No Protection = 0xffffffff = 4294967295 Low = 6 High = 3 Trusted Lists Only = 0x80000000 = 2147483648
To enable the JunkMail otions in the Options->Preferences->E-Mail->Junk E-mail menu
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\DisableAntiSpam =0
AutoArchive
Recently the function AutoArchive vanished from Outlook, don't panic! To enable AutoArchive in the Menu->File again just change the following registry value:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Preferences\DisableManualArchive = 0
Changing this value is not sufficient to get access back the AutoArchive options. You need to delete the entire registry key Preferences. Not sure everything needs to go, but it does the work.
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Preferences]
All in one registry file
You can also put all the above registry modifications in one single file [{{#file:Outlook.reg}} Outlook.reg]
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook]
"DisableAntiSpam"=dword:00000000
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Cached Mode]
"NoFullItems"=-
"NoDrizzle"=-
"NoHeaders"=-
"CachedExchangeMode"=-
"NoManualOnlineSync"=-
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Options\Mail]
"JunkMailProtection"=-
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Setup]
"ModifyAccounts"=dword:00000000
;Take care of that one, it could delete more than intended...
[-HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\Preferences]
...and modify the registry at each startup with the following command:
regedit /s Outlook.reg
Note: the hyphens after the registry value and in front of the registry key indicates respectively a request to delete the value and the entire key. See http://support.microsoft.com/kb/310516 for details.
Group Policy and other configuration hints
To use the Group Policy for Microsoft Outlook 2007 you may need to install the Outlook Group Policy template Outlk12.adm
- Copy the policy template Outlk12.adm into %WINDIR%\inf
- Open Group Policy Editor: Start-> Run-> gpedit.msc
- Add template:
- Select User Configuration
- Right-click on Administrative Templates
- Select Add/Remove properties-> Click Add button
- Browse to %WINDIR%\inf and select Outlk12.adm
iCalendar
Outlook does not handle correctly the iCal file (*.ics) with recurrent event.
Problem: when opening (eg.: double-click on the attachment) an iCal file with multiple events, ie. multiple VEVENT sections, Outlook tries to add a complete calendar. Your are prompted with a dialog box with the following question: Add this Internet Calendar to Outlook. It is probably not what you want. Most probably you just need to add the multiple events in your existing calendar.
The solution requires to save the iCal file on your hard drive and import it back using the import function.
- Save file as...
- File -> Import and Export...
- Select Import and iCalendar (*.ics) or vCalendar (.vcs)
- Browse and select your saved iCal file, done.
Solution source: https://events.sfu.ca/manual/en/iCalExporter.htm.
Moving PST location
cf this post
- Close Outlook.
- Open Control Panel -> Choose Mails -> Click on Data files.
- Select the Account name and check for the location of the PST file. Leave the window open.
- Open the folder containing the PST. Move the PST to the desired location.
- Do NOT rename the file - if you do Outlook creates a new file in the default location again.
- Switch to the Data Files window (as opened in Step 2) and double click on the PST file location.
- This displays an error window, Ignore the error, and point to the new location. Close the windows.
- Restart Outlook.
- Outlook may create a new PST in the default location again, delete it, in such a case.
Recovering PST password
Password protection of PST is terribly wrong.
Get PstPassword, a free Outlook PST Password Recovery, launch it and launch your PST, you'll get instantly a password, actuallt many passwords, and they will all work! How is it possible? Read this.
Note that McAfee detects the program as "Potentially Unwanted Program", a "Generic PUP.z":
McAfee(R) Avert™ recognizes that this program may have legitimate uses in contexts where an authorized administrator has knowingly installed this application
But still no question, the program is simply erased by McAfee.
One easy solution: open it under andLinux and run it with WINE :-)
Apparently this can work both on "compressible encryption" and "high encryption" types of PST.
Macros
Installation
To install a macro:
- Alt-F11 in Outlook
- Open Project1 -> Microsoft Office Outlook Objects -> ThisOutlookSession (double-click)
- copy/paste code
- close & save
If required, allow unsigned macros:
- Tools -> Macro -> Security -> Macro Security -> Warning for all macros
You'll have annoying popup at startup but there is no way around
Adding toolbar button to execute a Macro
- Create a new toolbar. Right-click on any Outlook toolbar and choose "Customize." From the Toolbars tab, hit the "New" button, and name your toolbar anything you want (like "my shortcuts"). Drag and drop your new toolbar to the top of Outlook to dock it next to your other toolbars.
- Add a Macro to your new toolbar. With the Customize dialog still open, go to its Commands tab. From the Commands tab, scroll down the Categories list, select Macros. In the Commands list select, drag and drop your Macro to your new toolbar.
- Customize your new shortcut/button. With the Customize dialog still open, go to its Commands tab. Click on the new button in the toolbar (not in the Customize dialog). The button Modify Selection in the Customize dialog is now enabled. Click on it to change multiple properties of your new toolbar button.
Solution source: http://lifehacker.com/381966/tweak-microsoft-outlook-to-empty-your-inbox-faster
Todo: add the macro in the right-click menu.
Send & Save
Lotus Notes can prompt the sender to specify what folder a message should be saved in. In Outlook, you can set the storage folder on the Options dialog. This VBA code reproduces something closer to the Notes behavior by popping up the Select Folder dialog when the user sends the message. (see here and there)
UPDATE: Avoid treating appointments as it fails.
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
Set objNS = Application.GetNamespace("MAPI")
If TypeOf Item Is MailItem Then
Set objFolder = objNS.PickFolder
If TypeName(objFolder) <> "Nothing" Then
Set Item.SaveSentMessageFolder = objFolder
End If
End If
Set objFolder = Nothing
Set objNS = Nothing
End Sub
Move To Archive
Lotus Notes provided a way to archive mails manually. This feature is not supported by Outlook. To point is to select one or multiple mails in the inbox and move then with one single action to an archive folder. The following macro helps you to move mail into a dedicated archive folder (selected PST file + selected folder):
Note:You may need to change the name of the PST file ("Personal Folders") and the target folder ("Ancient Archive") according to your setup.
OBSOLETE: take a look at the macro Archive Now
Sub MoveToArchive()
On Error Resume Next
Dim objFolder As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem
Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.Folders("Personal Folders").Folders("Ancient Archive")
'Assume this is a mail folder
If objFolder Is Nothing Then
MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
End If
If Application.ActiveExplorer.Selection.Count = 0 Then
'Require that this procedure be called only when a message is selected
Exit Sub
End If
For Each objItem In Application.ActiveExplorer.Selection
If objFolder.DefaultItemType = olMailItem Then
If objItem.Class = olMail Then
objItem.UnRead = False
objItem.Move objFolder
End If
End If
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objNS = Nothing
End Sub
Solution source: http://www.yeraze.com/article.php/outlook_macro_move_to_folder_mark_Read
Archive Now
The Archive Now macro better mimic the expected behavior of the Archive Selected Items of Lotus Notes (I never thought I would like to mimic anything from Lotus Notes,...) This Archive Now macro moves the selected mails in the same sub-folder as its original location. Note that the archive operation does not depend on any time and date information. All selected mails (and mails only) will be archived/moved.
Note: in this version the destination folder MUST exist. Folder(s) creation is part of the TODO list. Hint: you can run an AutoArchive command to get the folders created.
Note: you may need or want to change the destination name (ie: "Archive Folders")
' Routine/Macro to archive selected mails into given data file
Sub ArchiveNow()
On Error Resume Next
MoveToFolder ("Archive Folders")
End Sub
' Function to move selected mails into given data file
Public Function MoveToFolder(destName As String)
Dim objApp As Application
Dim objFolder As Outlook.MAPIFolder
Dim strCurrentFolderPath As String, strDestinationFolderPath As String
Dim arrFolders() As String, arrDestFolders() As String
Dim objNS As Outlook.NameSpace
' Some basic initialization
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
' Abort if nothing selected
If objApp.ActiveExplorer.Selection.Count = 0 Then
'Require that this procedure be called only when a message is selected
Exit Function
End If
' Get current folder path and prepare associated array
strCurrentFolderPath = objApp.ActiveExplorer.CurrentFolder.FolderPath
strCurrentFolderPath = Replace(strCurrentFolderPath, "/", "\")
arrFolders() = Split(strCurrentFolderPath, "\")
' Strip out the root name (equiv. to the PST name)
ReDim arrDestFolders(0 To UBound(arrFolders) - 3) As String
For I = 3 To UBound(arrFolders)
arrDestFolders(I - 3) = arrFolders(I)
Next
strDestinationFolderPath = destName + "\" + Join(arrDestFolders, "\")
' Get destination folder object
Set objFolder = GetFolder(strDestinationFolderPath)
' Check if destination folder exist - TODO: create the folder
If objFolder Is Nothing Then
MsgBox "The destination folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER"
Exit Function
End If
' Move mails to destination folder
For Each objItem In objApp.ActiveExplorer.Selection
If objFolder.DefaultItemType = olMailItem Then
If objItem.Class = olMail Then
objItem.UnRead = False
objItem.Move objFolder
End If
End If
Next
Set objNS = Nothing
Set objApp = Nothing
Set objItem = Nothing
Set objFolder = Nothing
End Function
Public Function GetFolder(strFolderPath As String) As MAPIFolder
' folder path needs to be something like
' "Public Folders\All Public Folders\Company\Sales"
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colFolders As Outlook.Folders
Dim objFolder As Outlook.MAPIFolder
Dim arrFolders() As String
Dim I As Long
On Error Resume Next
strFolderPath = Replace(strFolderPath, "/", "\")
arrFolders() = Split(strFolderPath, "\")
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders.Item(arrFolders(0))
If Not objFolder Is Nothing Then
For I = 1 To UBound(arrFolders)
Set colFolders = objFolder.Folders
Set objFolder = Nothing
Set objFolder = colFolders.Item(arrFolders(I))
If objFolder Is Nothing Then
Exit For
End If
Next
End If
Set GetFolder = objFolder
Set colFolders = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Function
Inspiration source: http://www.outlookcode.com/codedetail.aspx?id=321
Interoperability between Exchange/Outlook & Linux
PST to Maildir
- In Outlook:
- New -> Outlook Data File... -> Outlook 97-2002 Personal Folders file
- Copy/Move mails to it
- Right-Click on it -> Close it (probably safer)
- In Linux:
- Convert to mbox using readpst, then to Maildir using mb2md
mkdir pst
readpst -r -o pst backup.pst
find pst -name mbox -size 0 -exec rm {} \;
find pst -mindepth 2 -type d -print0|xargs --null -I XXX mb2md -s "$(pwd)/XXX/mbox" -
find pst -mindepth 2 -name mbox -print0|xargs --null rm
I tried the PST Import plugin v1.2 for Thunderbird but it failed finding any mail in the PST
Openchange
I tried the one from Debian Experimental (version 1.0~svn679-1)
mapiprofile --address=A.B.C.D --username=name --password=passwd --domain=DOM --workstation=BLABLA --profile=test --create
-> segfault from libmapi0
I tried to compile the libmapi0 from the SVN, no segfault anymore but still failed
Evolution
Apparently ther is an attempt to support MAPI in a development branch but it has too much recent dependencies for me to compile it...
svn checkout http://svn.gnome.org/svn/evolution/branches/EXCHANGE_MAPI_BRANCH
svn diff http://svn.gnome.org/svn/evolution/trunk http://svn.gnome.org/svn/evolution/branches/EXCHANGE_MAPI_BRANCH