I don't get that error message here (Outlook 2010), and there is no need to either create a new Outlook application nor to use the word editor if you are only editing the message as you have described, if you are running the code from Outlook itself. You can therefore simplify the main code
Option Explicit
Public Sub ExportAttachments()
Dim objMsg As Object
Dim objAttachments As Outlook.Attachments
Dim objSelection As Outlook.Selection
Dim i As Long, lngCount As Long
Dim filesRemoved As String, fName As String, strDate As String
Dim alterEmails As Boolean
Dim result As Long
result = MsgBox("Do you want to remove attachments from selected file(s)? ", vbYesNo + vbQuestion)
alterEmails = (result = vbYes)
Set objSelection = ActiveExplorer.Selection
For Each objMsg In objSelection
If objMsg.Class = olMail Then
If alterEmails Then
With objMsg
Set objAttachments = .Attachments
lngCount = objAttachments.Count
If lngCount > 0 Then
filesRemoved = ""
For i = lngCount To 1 Step -1
fName = objAttachments.Item(i).Filename
strDate = Now()
If objAttachments.Item(i).size > 5200 Then
filesRemoved = filesRemoved & "<br>""" & objAttachments.Item(i).Filename & """ (" & _
formatSize(objAttachments.Item(i).size) & ") " & strDate
objAttachments.Item(i).Delete
End If
Next i
filesRemoved = "<b>Attachments removed</b>: " & filesRemoved & "<br><br>"
.HTMLBody = filesRemoved + objMsg.HTMLBody
.Save
End If
End With
End If
End If
Next objMsg
ExitSub:
Set objAttachments = Nothing
Set objMsg = Nothing
Set objSelection = Nothing
End Sub