Fixed font Subject: Re: No Attachment Warning - VBA Code HELP
Author: Patrick Graven Date: 05 Aug 2011
References: 1
Did you ever get this to work? I'd like to configure the same warning in Outlook 2007. Also, if it's not too much trouble, tell me where in Outlook to put this code to enable such a warning, to warn me that I forgot to attach a file if I used the work 'attached' in my text.

Thanks!

> On Sunday, March 14, 2010 11:07 AM fruitchunk wrote:

> I had this code in Outlook 2003 it warned me when I sent email without
> attachment if it found the word attached in the email.
>
> It does not work in Outlook 2007, please help. Thanks.
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
> Dim lngres As Long
> If InStr(1, Item.Body, "attach") <> 0 Then
> If Item.Attachments.Count = 0 Then
>
> lngres = MsgBox(" Found 'Attach' in message, but no attachment found - send
> anyway?", _
>
> vbYesNo + vbDefaultButton2 + vbQuestion, "You asked me to warn you...")
>
> If lngres = vbNo Then Cancel = True
>
> End If
>
> End If
> End Sub


>> On Monday, March 15, 2010 4:03 AM Michael Bauer [MVP - Outlook] wrote:

>> See under Tools/Macro/Security whether VBA is allowed to be executed.
>>
>> --
>> Best regards
>> Michael Bauer - MVP Outlook
>> Manage and share your categories:
>> <http://www.vboffice.net/product.html?lang=en>
>>
>>
>> Am Sun, 14 Mar 2010 08:07:01 -0700 schrieb fruitchunk:
>>
>> send