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