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 / February 2004

Tip: Looking for answers? Try searching our database.

Custom form Item_Open event not getting called....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan - 18 Feb 2004 17:31 GMT
I have a custom contact form that I populate upon the Item_Open event.  However, this event is not getting called every time the form is loaded.  For example, if I make a change to the form, then close the form using the 'X' in the top right corner, I get a message box asking if I want to save the changes made.  Whether I click 'Yes' or 'No', the next time I open the form, the Item_Open event is not called.  

Any ideas why?

Thanks much.
Sue Mosher [MVP-Outlook] - 18 Feb 2004 18:10 GMT
Sounds like your form is getting one-offed, which means it won't run code.
See http://www.slipstick.com/dev/formpub.htm#oneoff
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 custom contact form that I populate upon the Item_Open event.  However, this event is not getting called every time the form is loaded.
For example, if I make a change to the form, then close the form using the
'X' in the top right corner, I get a message box asking if I want to save
the changes made.  Whether I click 'Yes' or 'No', the next time I open the
form, the Item_Open event is not called.

> Any ideas why?
>
> Thanks much.
Alan - 18 Feb 2004 21:16 GMT
Sue, I think you were right...I am creating a one-off form that is then not running correctly.      
What I am doing is dynamically adding some controls to a form after it is opened.  When that form is saved, I think a one-off form is created.  Is there a way I can work around this?  I need to be able to save the data changes to the form, but I do not want to save the controls that are dynamically added to the form.  Is there a way to distinguish between them?  Any thoughts on how I can work around this

Thanks

    ----- Sue Mosher [MVP-Outlook] wrote: ----
   
    Sounds like your form is getting one-offed, which means it won't run code
    See http://www.slipstick.com/dev/formpub.htm#oneof
    --
    Sue Mosher, Outlook MV
    Author o
         Microsoft Outlook Programming - Jumpstart fo
         Administrators, Power Users, and Developer
         http://www.outlookcode.com/jumpstart.asp
   
   
    "Alan" <anonymous@discussions.microsoft.com> wrote in messag
    news:A5D8E69D-6DBE-4D6F-B7A3-39E08671623F@microsoft.com..
    > I have a custom contact form that I populate upon the Item_Open event
    However, this event is not getting called every time the form is loaded
    For example, if I make a change to the form, then close the form using th
    'X' in the top right corner, I get a message box asking if I want to sav
    the changes made.  Whether I click 'Yes' or 'No', the next time I open th
    form, the Item_Open event is not called
    >> Any ideas why
    >> Thanks much
Sue Mosher [MVP-Outlook] - 18 Feb 2004 23:45 GMT
You could try resetting the MessageClass property before saving the item:

Dim strClass

Function Item_Open()
   strClass = Item.MessageClass
End Function

Function Item_Write
   Item.MessageClass = strClass
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

> Sue, I think you were right...I am creating a one-off form that is then not running correctly.
> What I am doing is dynamically adding some controls to a form after it is opened.  When that form is saved, I think a one-off form is created.  Is
there a way I can work around this?  I need to be able to save the data
changes to the form, but I do not want to save the controls that are
dynamically added to the form.  Is there a way to distinguish between them?
Any thoughts on how I can work around this?

> Thanks.
>
>      ----- Sue Mosher [MVP-Outlook] wrote: -----
>
>      Sounds like your form is getting one-offed, which means it won't run code.
>      See http://www.slipstick.com/dev/formpub.htm#oneoff

>      "Alan" <anonymous@discussions.microsoft.com> wrote in message
>      news:A5D8E69D-6DBE-4D6F-B7A3-39E08671623F@microsoft.com...
[quoted text clipped - 6 lines]
>      >> Any ideas why?
>      >> Thanks much.
 
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



©2009 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.