Attachment Checking

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Attachment Checking

Ryan Puddephatt

All,

            After Erik’s suggestion I had a dig around on the internet and found a plugin for both Outlook and Thunderbird to check for attachments when certain words are mentioning in the subject or body. Brilliant for me!

 

Outlook is VB copy and past code like so :

 

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

    If Item.Class <> olMail Then Exit Sub

    If Item.Attachments.Count > 0 Then Exit Sub

    If Not SearchForAttachWords(Item.Subject & ":" & Item.Body) Then Exit Sub

    If UserWantsToAttach = vbYes Then

        Cancel = True

    End If

End Sub

 

Function SearchForAttachWords(ByVal s As String) As Boolean

    Dim v As Variant

    For Each v In Array("attach", "enclos")

        If InStr(1, s, v, vbTextCompare) <> 0 Then

            SearchForAttachWords = True

            Exit Function

        End If

    Next

End Function

 

Function UserWantsToAttach() As VbMsgBoxResult

    UserWantsToAttach = MsgBox("It appears you may have forgotten to specify an attachment." _

        & vbCrLf & vbCrLf & "Would you like to do this now?", vbQuestion + vbYesNo)

End Function

 

To do this Alt-F11 select ThisOutlookSession and copy it in (base on code at http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=341 by Dave Horowitz)

 

I then had a little look around for Thunderbird, a Google search brought up a few results, but this looked the most promising (ATTACHMENTREMEMBER at https://nic-nac-project.de/~kaosmos/index-en.html)

 

Hope this helps a few!

 

Ryan

 

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108

 

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Attachment Checking

Erik Bruchez
Administrator
Thanks for the tips. And let's see if your next post comes with an
attachment right away :-)

-Erik

Ryan Puddephatt wrote:

> All,
>
>             After Erik’s suggestion I had a dig around on the internet
> and found a plugin for both Outlook and Thunderbird to check for
> attachments when certain words are mentioning in the subject or body.
> Brilliant for me!
>
>  
>
> Outlook is VB copy and past code like so :
>
>  
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
>     If Item.Class <> olMail Then Exit Sub
>
>     If Item.Attachments.Count > 0 Then Exit Sub
>
>     If Not SearchForAttachWords(Item.Subject & ":" & Item.Body) Then
> Exit Sub
>
>     If UserWantsToAttach = vbYes Then
>
>         Cancel = True
>
>     End If
>
> End Sub
>
>  
>
> Function SearchForAttachWords(ByVal s As String) As Boolean
>
>     Dim v As Variant
>
>     For Each v In Array("attach", "enclos")
>
>         If InStr(1, s, v, vbTextCompare) <> 0 Then
>
>             SearchForAttachWords = True
>
>             Exit Function
>
>         End If
>
>     Next
>
> End Function
>
>  
>
> Function UserWantsToAttach() As VbMsgBoxResult
>
>     UserWantsToAttach = MsgBox("It appears you may have forgotten to
> specify an attachment." _
>
>         & vbCrLf & vbCrLf & "Would you like to do this now?", vbQuestion
> + vbYesNo)
>
> End Function
>
>  
>
> To do this Alt-F11 select ThisOutlookSession and copy it in (base on
> code at http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=341 
> by Dave Horowitz)
>
>  
>
> I then had a little look around for Thunderbird, a Google search brought
> up a few results, but this looked the most promising (ATTACHMENTREMEMBER
> at https://nic-nac-project.de/~kaosmos/index-en.html)
>
>  
>
> Hope this helps a few!
>
>  
>
> Ryan
>
>  
>
> *Ryan Puddephatt*
>
> Software Engineer
>
> TFX Group - IT UK
>
> 1 Michaelson Square
>
> Livingston
>
> West Lothian
>
> Scotand
>
> EH54 7DP
>
>  
>
> * [hidden email]
>
> ( 01506 407 110
>
> 7  01506 407 108
>
>  
>
>  
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws