Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / August 2004

Tip: Looking for answers? Try searching our database.

Write_event problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sparkle_guy - 31 Jul 2004 16:33 GMT
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
Sue Mosher [MVP-Outlook] - 04 Aug 2004 13:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.