Skip to main content

Outlook Missing Attachment Reminder - All versions (2003, 2007, 2010, 2013)

This Outlook macro will remind you to attach a file if it finds the word "attach" or "PFA" in your email and no actual file is attached.
Adding a macro to Outlook is easy. Just copy everything below starting with "Private Sub" through "End Sub." 
In Outlook, select the "Tools | Macro | Visual Basic Editor" menu option. 
In Outlook 2010, Select File | Options | Customize Ribbon | Under Customize the Ribbon | Check the "Developer" option to enable it and click "OK" to close the dialogue box. Then Click on the Developer in the Ribbon Menu and click on Macro.

You may need to expand the project by clicking the plus signs under Project1 until you see ThisOutlookSession, and double-click it. Click into the big white empty page and hit Paste.

Please find the screenshot attached of what the editor should look like below the code.
Click Save and you'll be all set. If you've previously disabled macros you'll need to enable them.
*Note: Outlook Express doesn't support macros.

*Update: Outlook counts files used in Signatures as attachments. If your signature uses one or more files, find the line intStandardAttachCount = 0 and make it equal the number of files in your signature. 

Code Begins:
--------------------------------------------------------------------------------------------------------------------
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim m As Variant
Dim strBody As String
Dim intIn, intPFA As Long
Dim intAttachCount As Integer, intStandardAttachCount As Integer

On Error GoTo handleError

'Edit the following line if you have a signature on your email that includes images or other files. Make intStandardAttachCount equal the number of files in your signature.
intStandardAttachCount = 0

strBody = LCase(Item.Body)

intIn = InStr(1, strBody, "original message")


If intIn = 0 Then intIn = Len(strBody)
intPFA = intIn

intIn = InStr(1, Left(strBody, intIn), "attach")
intPFA = InStr(1, Left(strBody, intPFA), "pfa")

intAttachCount = Item.Attachments.Count

If (intIn > 0 Or intPFA > 0) And intAttachCount <= intStandardAttachCount Then
    
    m = MsgBox("It appears that you mean to send an attachment," & vbCrLf & "but there is no attachment to this message." & vbCrLf & vbCrLf & "Do you still want to send?", vbQuestion + vbYesNo + vbMsgBoxSetForeground)

    If m = vbNo Then Cancel = True
    
End If

handleError:
If Err.Number <> 0 Then
    MsgBox "Outlook Attachment Reminder Error: " & Err.Description, vbExclamation, "Outlook Attachment Reminder Error"
End If

End Sub 
--------------------------------------------------------------------------------------------------------------------
Code Ends.

Outlook Macro Editor ScreenShot
Outlook Macro Editor


Courtesy: This blog was enhanced from this original site Markbird site


Comments

Popular posts from this blog

AI Evaluation Harness: From Prompt Tests to Production Release Gates

A practical framework for building an AI evaluation harness that links test quality to release decisions and operational confidence. Evaluation harnesses turn subjective model quality into measurable release criteria. Combine functional, safety, latency, and cost checks into one pipeline. Block releases when critical thresholds are missed, even under delivery pressure. If your AI release decision is based on a demo, you are not releasing engineering software; you are releasing a hope strategy. A proper evaluation harness creates repeatable evidence for quality, safety, and cost trade-offs. Prerequisites Versioned prompts and model configuration. Representative test dataset by use case. CI/CD pipeline with artefact retention. Clear service-level objectives for latency and reliability. Evaluation layers 1) Functional correctness Golden set response checks. Tool invocation correctness. Schema compliance for structured outputs. 2) Safety and policy Prompt in...

AI Security and Ethics Checklist for Engineering Teams

A practical pre-release checklist for AI features covering security, misuse risk, transparency, and governance. Shipping AI features without security and ethics checks creates hidden operational risk. Use this checklist before each release. 1) Data and privacy Confirm data minimisation in prompts and context. Remove secrets and personal data from logs. Enforce retention windows for model inputs and outputs. Validate third-party processor boundaries. 2) Security controls Restrict tool permissions by role and environment. Validate all tool outputs against strict schemas. Add prompt-injection defences for external content. Require approval gates for high-impact actions. 3) Safety and misuse Define clear disallowed use cases. Add risk prompts for potentially harmful requests. Add user-visible warnings for uncertain outputs. Add abuse monitoring and escalation paths. 4) Transparency and trust Disclose where AI assistance is used. Explain known limitations...

Scaling AI Agents in Insurance Claims: Human-Centric Automation Strategies

Design patterns for agent-assisted claims that amplify human judgment while achieving 40% faster processing in regulated settings. Design patterns for agent-assisted claims that amplify human judgment while achieving 40% faster processing in regulated settings. 2026 insurance predictions stress hyper-automated claims with people-first AI. Includes controls, pitfalls, and a phased implementation path. Design patterns for agent-assisted claims that amplify human judgment while achieving 40% faster processing in regulated settings. Why this matters Teams are under pressure to deliver AI capability quickly, but speed without control creates operational and governance risk. This guide focuses on practical execution patterns that hold up in production. Prerequisites Clear ownership for delivery and risk decisions. Baseline observability for model and tool behaviour. Defined quality and security acceptance criteria. Practical approach Define the business decision this...