If you’ve enabled “auto format internet and network paths with hyperlinks” feature in Outlook, the email addresses will be auto formatted with “mailto” links, too. Now, if you want to batch remove all email links, you can use the way in this post.
Perhaps you have noticed that the internet paths and email addresses will be converted into hyperlinks automatically. It is because that Outlook is set to auto format the internet and network paths with hyperlinks by default, as shown in the following screenshot.
In reality, for most of the users, they merely hope to format network paths with hyperlinks. They don’t like to format email addresses with “mailto” hyperlinks. In this case, they long for a method to quickly remove all email links in batches. Now, in the followings, we will introduce such a method.
Batch Remove All Email Links in Outlook Message
- At first, launch Outlook program.
- Then, trigger VBA editor by clicking the “Visual Basic” button in “Developer” ribbon.
- Next, in the “Microsoft Visual Basic for Applications” window, copy the code below into an unused module.
Sub RemoveMailtoHyperlinks() Dim objMail As Outlook.MailItem Dim objMailDocument As Word.Document Dim objHyperlinks As Word.Hyperlinks Dim i As Long Dim objHyperlink As Word.Hyperlink Dim strLinkText, strLinkAddress As String 'Get the mail Select Case Outlook.Application.ActiveWindow.Class Case olInspector Set objMail = ActiveInspector.CurrentItem Case olExplorer Set objMail = ActiveExplorer.Selection.Item(1) End Select Set objMailDocument = objMail.GetInspector.WordEditor Set objHyperlinks = objMailDocument.Hyperlinks If objHyperlinks.Count > 0 Then For i = objHyperlinks.Count To 1 Step -1 Set objHyperlink = objHyperlinks.Item(i) strLinkText = objHyperlink.TextToDisplay strLinkAddress = objHyperlink.Address 'Get the hyperlink of email address If InStr(strLinkText, "@") > 0 And Left(strLinkAddress, 7) = "mailto:" And InStr(strLinkText, "@") > 0 Then 'Remove this hyperlink objHyperlink.Delete End If Next Else MsgBox "No Hyperlink!", vbExclamation + vbOKOnly End If End Sub
- After that, add this macro to Quick Access Toolbar or ribbon.
- Finally, you can have a try.
- First off, compose an email which contains hyperlinks of network paths and email addresses, like the following screenshot.
- Then, click the macro button.
- When macro completes, as you can see, the “mailto” hyperlinks of email addresses have been removed.
Watch Out for Unknown Links
You must have ever received the emails which have a lot of hyperlinks in body. If this email is from an unknown sender or its hyperlinks are in unknown domains, you should never readily open the links. It is because that they may be malicious. Once you open them, your Outlook file and even the whole computer can be virus infected. At that time, it is too late to regret. What you can do is to first kill viruses by antivirus software and then resort to a remarkable Outlook recovery tool to fix Outlook file, such as DataNumen Outlook Repair.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including damaged mdf and outlook repair software products. For more information visit www.datanumen.com
Leave a Reply