How to Restore the Outlook Cache- autocomplete email addresses

To those IT support guys who are now busy with WIN7 migration, you must be facing this problem after migrating user profile to a new laptop. However, if you want to restore the cache of outlook, please follow the below steps:

  • Log in to the old device with the user credential from which you want to restore the cache
  • From Run command type %APPDATA%\Microsoft\Outlook and press enter
  • Copy the file with .nk2 extension
  • Log in to the new device with the user credential to which you want to restore the cache
  • From Run command type %APPDATA%\Microsoft\Outlook and press enter
  • Close outlook and rename the existing .nk2 file
  • Copy the old .nk2 file and rename it as it shows in the new device
  • Run Outlook

Outlook data confidentiality – Check specific word and block mail while sending mail from MS Outlook

You can check and avoid sending confidential data from MS Outlook by using the below script. Steps you can follow:
1. Enable macro in outlook
2. Click on Outlook Tools –> Macro –> Visual basic editor
3. In the editor window expand the Project tree –> Microsoft Office Outlook This outlook session
4. Copy and paste the below code
** This code will check whether there is any number exists in your mail body and alert you and ask for confirmation before sending.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim a As String
Dim b
Dim strMSG As String

a = Item.Body
b = Extract_Number_from_Text(a)
strMSG = “Number found: ##” & CStr(b) & “##. Do you want to send the message?”

If b =0 Then
If MsgBox(strMSG, vbInformation + vbYesNo, “Developed by: Sayem-masudur.sayem@hotmail.com”) = vbNo Then
Cancel = True
End If
End If

End Sub

Function Extract_Number_from_Text(Phrase As String) As Double
On Error Resume Next
Dim Length_of_String As Integer
Dim Current_Pos As Integer
Dim Temp As String
Length_of_String = Len(Phrase)
Temp = “”
For Current_Pos = 1 To Length_of_String
If (Mid(Phrase, Current_Pos, 1) = “-“) Then
Temp = Temp & Mid(Phrase, Current_Pos, 1)
End If
If (Mid(Phrase, Current_Pos, 1) = “.”) Then
Temp = Temp & Mid(Phrase, Current_Pos, 1)
End If
If (IsNumeric(Mid(Phrase, Current_Pos, 1))) = True Then
Temp = Temp & Mid(Phrase, Current_Pos, 1)
End If
Next Current_Pos
If Len(Temp) = 0 Then
Extract_Number_from_Text = 0
Else
Extract_Number_from_Text = CDbl(Temp)
End If
End Function

5. Now while sending mail your outlook will automatically check – whether there is any number in your mail body. If yes – it will prompt for confirmation. If you select no – your message will not be sent.