Solved

Outlook does not close Personal Folder files

Posted on 2000-05-14
3
373 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
ID: 2808456
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
ID: 2809075
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
ID: 2882522
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
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 …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

770 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