Attribute VB_Name = "FMU" Sub ForwardMaliciousURL() Dim sel As Selection Dim selObj As Object Dim mi, om As mailItem Dim count As Integer Set sel = ThisOutlookSession.ActiveExplorer.Selection If sel.count <> 1 Then Exit Sub End If Set selObj = sel.item(1) If TypeOf selObj Is mailItem Then Set mi = selObj Else Exit Sub End If Set om = ThisOutlookSession.CreateItem(olMailItem) om.BodyFormat = olFormatHTML om.Body = ExtractURLs(mi.Body, count) om.Subject = count & " BLAHBLAHBLAH" om.SentOnBehalfOfName = "BLAHBLAHBLAH" om.To = "BLAHBLAHBLAH" om.Display (Modal = True) End Sub Function ExtractURLs(text As String, ByRef count As Integer) As String Dim regEx, links, link As Object Dim result As String Set regEx = ThisOutlookSession.CreateObject("VBScript.RegExp") regEx.Global = True regEx.IgnoreCase = True regEx.Pattern = "\n(http[^\n]*)\n" Set links = regEx.Execute(text) result = "" count = 0 For Each link In links result = result & link.SubMatches.item(0) count = count + 1 Next ExtractURLs = result End Function