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 / Calendaring / September 2006

Tip: Looking for answers? Try searching our database.

Outlook2003 -> OLE (MAPFolder->Display())

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
friedemannkunze - 31 Aug 2006 16:33 GMT
Dear Members,
i've the problem with outlook 2003, that it does not terminate correctly if
the user is closing outlook normally.
The reason for this behaviour is, I get the outlook application object with
GetObject("Outlook.Application") and I try to show a specific folder from
outlook like calendar or tasks. After I call the method Folder->Dispplay I
release all used objects. But if then the user is closing outlook normally,
it switches into the windows systray-menue. There it's impossible for the
user to work with outlook - it's not possible to open it. The only way to
close outlook then, is to kill the process over the taskmanager.
I was able to limit the problem: The cause is to show a folder to the user.
Instead of using the method "Display",I've tried to use "Activate". But here
is the same problem as above.

Following, you can take a look at my sample script with which the problem can
be reproduced:
Option Explicit
Dim oOutlook
On Error Resume Next
Set oOutlook = GetObject(,"Outlook.Application")
    If (Err.Number <> 0) Then
        Set oOutlook = Nothing
        WScript.Quit
    End If
On Error GoTo 0
Dim oNameSpace
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
Dim oFolder
Set oFolder = oNameSpace.GetDefaultFolder(9)
oFolder.Display
Set oFolder = Nothing
Set oNameSpace = Nothing
Set oOutlook = Nothing

I thank you for your help.

Additional information:
The problem is not reprocueable with outlook 2002 and sample script above.
Brian Tillman - 31 Aug 2006 22:58 GMT
> i've the problem with outlook 2003, that it does not terminate
> correctly if the user is closing outlook normally.
> The reason for this behaviour is, I get the outlook application
> object with GetObject("Outlook.Application") and I try to show a
> specific folder from outlook like calendar or tasks.

Wouldn't this be better asked in the programming group?
news://msnews.microsoft.com/microsoft.public.outlook.program_vba
Signature

Brian Tillman

friedemannkunze - 01 Sep 2006 08:18 GMT
>> i've the problem with outlook 2003, that it does not terminate
>> correctly if the user is closing outlook normally.
[quoted text clipped - 4 lines]
>Wouldn't this be better asked in the programming group?
>news://msnews.microsoft.com/microsoft.public.outlook.program_vba

Ohh yes! You'r right. My mistake; but yesterday it was strange. But thanks
for the link.
 
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



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