Re: Outlook 2007 error with MS10-045 KB980376 - 'The attachment size exceeds the allowable limit'

Status
Not open for further replies.
T

Tech Ben



I ran into this same problem where a user wanted to modify a recurring meeting with no end date. I looked at the appointment item in the VBA macro window and saw that it had 21 attachments that were that had accumilated but were not showing on the actual appointment. The user had sent out a number of attachments in the past but had later removed them. I wrote some VBA code for outlook to remove all of the attachments for the selected appointment. It is definately easier to use this than remove a patch and then re-install it. Here is the code for any that are interested.

Sub Delete_All_Attachments_From_Appointment()
On Error Resume Next

Select Case TypeName(Application.ActiveWindow)
Case "Explorer"

If TypeName(ActiveExplorer.Selection.Item(1)) = "AppointmentItem" Then
Set GetApptItem = ActiveExplorer.Selection.Item(1)
Else
MsgBox "Error an appointment is not selected."
Exit Sub
End If

Case "Inspector"
If TypeName(ActiveInspector.CurrentItem) = "AppointmentItem" Then
Set GetApptItem = ActiveInspector.CurrentItem
Else
MsgBox "Error an appointment is not selected."
Exit Sub
End If
End Select
If GetApptItem.Attachments.Count = 0 Then
MsgBox "This appointment has no attachments."
Exit Sub
End If
intResponse = MsgBox("Subject: " & GetApptItem.Subject & vbCr & _
"Attachments: " & GetApptItem.Attachments.Count & vbCr & _
"Total Size: " & GetApptItem.Size & " bytes" & vbCr & vbCr & _
"This will remove all attachments from this appointment, do you want to continue?", vbYesNo, "Are you sure?")
If intResponse = vbYes Then
While GetApptItem.Attachments.Count > 0
GetApptItem.Attachments(1).Delete
Wend
GetApptItem.Save
End If
On Error GoTo 0
'MsgBox "test"
End Sub

 
Status
Not open for further replies.
Top