Outlook hangs after initializing Form control

  • Thread starter Thread starter Sascha Gering
  • Start date Start date
S

Sascha Gering

Hi there,

I am developing an Outlook AddIn with VB6.
For that everything works well until I try to initialize a control from the
form I added in the appointment dialog.
After using all the inspectors, explorers etc. I always set them to nothing
to avoid any existing object instances.
But when I do this:

Dim ctrl_text
Set ctrl_text =
gBaseClass.objInsp.ModifiedFormPages("MyPage").Controls("test_text")
Set ctrl_text= Nothing

Outlook stays in the memory.
After closing the last existing explorer I unitilize every object and even
unset the class "gBaseClass" where every outlook object is encapsulated.

Any ideas are welcome!
 
Please do not post to so many groups, pick one or two.

When I access controls on a form in my COM addins I always explicitly
declare the controls as Object. If your code works and doesn't keep Outlook
in memory if you comment out the lines referring to the control then try
using Object instead of the implicit Variant that ctrl_text would be.

Also, I've found things work better using GetInspector with an item than
trying to use a module level Inspector object even if they should refer to
the same Inspector.
 
Hi Ken,

Ken Slovak - said:
Please do not post to so many groups, pick one or two.

Sorry!!! That was a reaction on my frustration level...;o)
When I access controls on a form in my COM addins I always explicitly
declare the controls as Object. If your code works and doesn't keep Outlook
in memory if you comment out the lines referring to the control then try
using Object instead of the implicit Variant that ctrl_text would be.

Also, I've found things work better using GetInspector with an item than
trying to use a module level Inspector object even if they should refer to
the same Inspector.

I will try that and give some feedback to you.
 
Back
Top