'Pridať referenciu na Microsoft Word 16.0 Object Library
Dim objItem As Object
Dim objInsp As Outlook.Inspector
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim objSel As Word.Selection
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
If Not objItem Is Nothing Then
If objItem.Class = olMail Then
Set objInsp = objItem.GetInspector
If objInsp.EditorType = olEditorWord Then
Set objDoc = objInsp.WordEditor
Set objWord = objDoc.Application
Set objSel = objWord.Selection
With objSel
If Len(.Text) > 1 Then .Hyperlinks.Add .Range, .Text
End With
End If
End If
End If
Set objItem = Nothing
Set objWord = Nothing
Set objSel = Nothing
Set objDoc = Nothing
Set objInsp = Nothing
End Sub
Pridať Modul, pridať referenciu, kód do modulu. Pridať na karte Vložiť novú skupinu, pridať do nej makro. Vo VBA editore Uložiť.
V Centre zabezpečenia v nastaveniach treba povoliť všetky makrá.citovat