Solved

Outlook does not close Personal Folder files

Posted on 2000-05-14
3
365 Views
Last Modified: 2012-06-21
When a Personal Folder file (.PST) is being removed from Outlook, the file itself is still open by Outlook until Outlook is shut down. This causes Sharing Violation when trying to move, copy or delete the PST file. I need to perform those actions on the PST file for automation reasons, without closing the Outlook application. I've tried removing the PST from within Outlook by right clicking on it and choosing "Disconnect" (or "Close" in Outlook 2000). I've tried it using the Tools->Services menu option and I've tried the DeleteMsgService MAPI function. All of those successfully removed the Personal Folder from the Outlook application, but the PST file remained open until Outlook shuts down.

Any ideas about how to convince Outlook to really close the file?
0
Comment
Question by:nirg
3 Comments
 
LVL 6

Expert Comment

by:VinceA
Comment Utility
From everything I've seen, you can't close the PST without closing Outlook (and the MAPI spooler terminating - if it's in use)
0
 
LVL 16

Expert Comment

by:Neo_mvps
Comment Utility
This is the best thing that comes into my head and taking into account that you are automating Outlook 2K and want the PST available to you at the next startup of Outlook/MAPI.

1] Using VB, VBScript, C++, or Delphi - use Outlook's Application.Quit method from automation to force outlook closed.

2] Release object above to clean out any last pointers in memory.

3] Work with the PST file in question

4] Create a new automation object refering to the Outlook.Application.

5] Open/Create an Explorer window for one of the default folders and display it.

6] Release object created in #4

The only thing that might hold you up is any other MAPI enable applications keeping the MAPI Spooler and running.  In this case you are right back to what VinceA stated.  Trying to figure out a way to get the MAPI Subsystem to shutdown gracefully.
0
 
LVL 1

Accepted Solution

by:
Dmaio earned 500 total points
Comment Utility
The same thing happened to me.  I chose to edit the registry.  If you don't feel comfortable with that there is a knowledge base article on the Microsoft Office Update site with steps on how to edit the .pst file from your registry.  The article was written for Outlook 98 but also applies to 2000.  The title is "Unable to Close Personal Folders File on the Folder List"  The Article ID is Q241880.  Basically the steps are as follows:  Quit Outlook--On the START menu click RUN, type "regedit, and click OK--Click to select the following registry key:  HKEY_CURRENT_USER/Software/Microsoft/Windows Messaging System/Profiles/your name or Microsoft Outlook Internet Settings

Then search through to find the personal folders file--Delete it and close the Registry Editor.  THis does not erase the .pst file.  It closes and removes the file from your Outlook folder list.  

Good Luck!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Use email signature images to promote corporate certifications and industry awards.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now