I have a form that when the write event is triggered (i.e. before "save" or
"save as" actions) some code is run. However the code also runs when the
form is sent. I have set the "save copy of sent messages" in properties to
off but the code still runs when the form is sent as well as when it is
subsequently saved. Any ideas what is going on or how to stop it.
Thanks Paul
You need to coordinate between the two events with a module-level flag:
Dim m_blnSent ' Boolean
Function Item_Send()
m_blnSent = True
End Function
Function Item_Write()
If Not m_blnSent Then
' do stuff with Item
End If
End Function

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> I have a form that when the write event is triggered (i.e. before "save" or
> "save as" actions) some code is run. However the code also runs when the
[quoted text clipped - 3 lines]
>
> Thanks Paul