problem with outlook application object
-
Hello all Good day . Though this question is not relevant to MFC or Win32 but to do with VB generic behavior => I have a outlook plugin ( COM plugin ) developed in VB 6.0 . We have an external application which uses the outlook addin to get the contact details from outlook. The problem is here => We create a new application object and free it as below => Set gApp = New Outlook.Application .... Set gApp = Nothing After this code is executed when we click on outlook application it says "Operation failed" . It looks like the outlook application object is not well freed by the statement Set gApp = Nothing . But I checked by adding the line below to ensure if the gApp is really free or not . If gApp is Nothing Then Log("gApp is free") Else Log ( "gApp is not free") Endif Even after this check it shows gApp is free which does not seem to be the case . What can I further do to make sure the object is really made NULL !!!! Going crazy with VB regards
redindian
-
Hello all Good day . Though this question is not relevant to MFC or Win32 but to do with VB generic behavior => I have a outlook plugin ( COM plugin ) developed in VB 6.0 . We have an external application which uses the outlook addin to get the contact details from outlook. The problem is here => We create a new application object and free it as below => Set gApp = New Outlook.Application .... Set gApp = Nothing After this code is executed when we click on outlook application it says "Operation failed" . It looks like the outlook application object is not well freed by the statement Set gApp = Nothing . But I checked by adding the line below to ensure if the gApp is really free or not . If gApp is Nothing Then Log("gApp is free") Else Log ( "gApp is not free") Endif Even after this check it shows gApp is free which does not seem to be the case . What can I further do to make sure the object is really made NULL !!!! Going crazy with VB regards
redindian
-
Hello all Good day . Though this question is not relevant to MFC or Win32 but to do with VB generic behavior => I have a outlook plugin ( COM plugin ) developed in VB 6.0 . We have an external application which uses the outlook addin to get the contact details from outlook. The problem is here => We create a new application object and free it as below => Set gApp = New Outlook.Application .... Set gApp = Nothing After this code is executed when we click on outlook application it says "Operation failed" . It looks like the outlook application object is not well freed by the statement Set gApp = Nothing . But I checked by adding the line below to ensure if the gApp is really free or not . If gApp is Nothing Then Log("gApp is free") Else Log ( "gApp is not free") Endif Even after this check it shows gApp is free which does not seem to be the case . What can I further do to make sure the object is really made NULL !!!! Going crazy with VB regards
redindian
dealing with outlook is especially difficult. first you need to attempt to connect to running instance and if successfull set a flag. if not current instance create one. do your stuff. then if you connected to running instance just free your stuff and go bye bye. if you created an instance call close on it and then go bye bye. NEVER call close on an instance you didnt create.
-
dealing with outlook is especially difficult. first you need to attempt to connect to running instance and if successfull set a flag. if not current instance create one. do your stuff. then if you connected to running instance just free your stuff and go bye bye. if you created an instance call close on it and then go bye bye. NEVER call close on an instance you didnt create.
-
Roger Broomfield wrote:
dealing with outlook is especially difficult.
I have not found this either in C++ or C#, the latter being especially easy.
Just say 'NO' to evaluated arguments for diadic functions! Ash
What I found, was that Outlook 2007, was unfriendly. It is a single instance multi process application that needs to be specifically closed. If you start it, you close it, if you dont specifically close an instance you started it sits in running processes until you log off. If you dont start it, you dont close it, but you do release all instances of objects you created. Maybe this is because I dont have the latest VS. But I dont see how that would affect the Outlook object model.