Item_CustomProperty fires before Item_Open?

W

willwong

Hi,

Is that supposed to happen? I was under the impression that to initialise
variables its good practice to do it under Item_Open since it is called once
the form is opened.

Whats happening is the CustomPropertyChange event fires off first and raises
an error since it refers to an object that has not yet been initialised hence
"Object required" error message.

Am I perhaps doing something wrong or is this normal and my only real
workaround is to handle the error?
 
S

Sue Mosher [MVP-Outlook]

Yes, that can definitely happen. The simple solution is to use a module-level Boolean variable to track whether the Open event has fired yet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top