February 15, 2012

Outlook - Autocomplete

Cleaning up auto-complete cache for Outlook 2007/2010:

OutlookClearAutocomplete.bat
"%ProgramFiles%\Microsoft Office\Office14\Outlook.exe" /CleanAutoCompleteCache
cd %APPDATA%\Microsoft\Outlook\
ren *.nk2 _*.nk2

Deleting only Exchange addresses (Outlook 2007):

nk2script.txt
If AddressType equal "EX" Delete

OutlookClearAutocomplete.bat
\\Domain.local\NETLOGON\NK2Edit.exe /script "\\
Domain.local\NETLOGON\nk2script.txt" "%APPDATA%\Microsoft\Outlook\Outlook.nk2" /LogFile "%APPDATA%\Microsoft\Outlook\nk2log.txt"

NK2Edit: http://www.nirsoft.net/utils/outlook_nk2_edit.html

---------------------------------------------------------------------------------------
DIM N2KFile
DIM FlagFile
DIM FileSys

SET FileSys = CreateObject("Scripting.FileSystemObject")
SET FlagFile = "%APPDATA%\Microsoft\Outlook\N2KCleared1.txt"
SET N2KFile = "%APPDATA%\Microsoft\Outlook\*.n2k"

IF FileSys.FileExist("FlagFile") THEN
    'Do Nothing
ELSE
    IF FileSys.FileExist("N2KFile") THEN
        FileSys.DeleteFile("N2KFile")
        FileSys.CreateTextFile("FlagFile")
    END IF
    IF FileSys.FileExist("N2KFile") THEN
        'Do Nothing
    ELSEIF FileSys.FileExist("FlagFile") THEN
        'Do Nothing
    ELSE
        Response.Write("N2K File Purge Process Failed.  Please contact the Helpdesk for further assistance.")
    END IF
END IF

---------------------------------------------------------------------------------------
Outlook - disabling address auto-complete

 

No comments:

Post a Comment