In Outlook 2003 VBA the RemoveStore method does not CLOSE a pst file but only removes it from the GUI. Is there a way to close the pst file by code? To shut down Outlook just to close a pst file is a

Posted on 2009-02-23
Last Modified: 2012-05-06
In Outlook 2003 VBA an already existing pst file can be opened from path in the GUI by the AddStore method and it can be removed from the GUI by the RemoveStore method. Strange but true: the file isnt closed by the remove method. To close it you have to close the Outllook application which is everything but an elegant way to close a file.

I want to close the pst by code so that other users may open and use it as an archive pst. Any idea?
Question by:Peter_M_Kroell
    1 Comment
    LVL 76

    Accepted Solution

    Hi, Peter_M_Kroell.

    It's not possible and it's not just when a PST file is closed via code.  Closing a PST through the GUI doesn't actually close it either.  It's a flaw in Outlook.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    755 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

    20 Experts available now in Live!

    Get 1:1 Help Now