Store.FilePath Property

GeoffG

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
QUESTIONS:

1. Why does the Store.FilePath property return a zero-length string when the store is used by an IMAP email address?

2. Is there a VBA property that will reveal the full hard-disc path for the PST file for a Gmail account?


MY SETUP:

I set up a Gmail email account in Microsoft Outlook 2010 on a Windows 10 computer:

This created a PST file on my hard disc.

The path to the PST file can be seen in two Outlook windows:

PATH TRUNCATED HERE:
File > Account Settings > Account Settings > Email Tab

FULL PATH HERE:
File > Account Settings > Account Settings > Data Files Tab > Settings


Very many thanks.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
It should get the path... but when i run this macro, it gets the exchange ost path but not gmail. I'll see if there is another way to get the path (will likely use Redemption) and find out if this is a bug.

Code:
Option Explicit

Private Sub GetDataFilePaths()
    Dim oStores As Outlook.Stores
    Dim oStore As Outlook.Store
  
    Set oStores = Application.Session.Stores

    For Each oStore In oStores

          Debug.Print oStore.DisplayName, oStore.FilePath

    Next

Set oStores = Nothing
Set oStore = Nothing
End Sub
 
Last edited:

GeoffG

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Very many thanks for your reply.
I was using similar code.
Strange that the path is returned for POP accounts, but not IMAP accounts.
I hope you get somewhere with it and I'll look out for any further replies.
Thanks again.
Geoff
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Yeah, its weird... best guess it has something to do with the change from pst files to ost files for imap accounts. Still waiting to hear from my contacts on why its not working.

I tried using this macro with redemption and it does not return the imap account. If i use skIUnknown, it returns it.

Code:
Sub testpath()
Set rdo = CreateObject("Redemption.RDOSession")

rdo.Logon


For Each Store In rdo.Stores
  If (Store.StoreKind = skPstAnsi) Or (Store.StoreKind = skPstUnicode) Then
    Debug.Print Store.Name & " - " & Store.PstPath
  ElseIf (Store.StoreKind = skPrimaryExchangeMailbox) Then
    Debug.Print Store.Name & " - " & Store.OSTPath
  ElseIf (StoreKind = skIMAP4) Then
    
    Debug.Print Store.Name & " - " & "IMAP"

  End If
Next


End Sub
 

GeoffG

New Member
Outlook version
Outlook 2010 32 bit
Email Account
IMAP
Many thanks for your reply.

I made a slight change to your code (copying your examples).

I found the Store.PSTPath property returned the path to the PST files storing data for the gmail accounts.

Sorry, I'm afraid I don't understand the significance of your comment that the macro does not work with Redemption - it did for me.

If the macro is not working for you (but is for me), then perhaps there are Outlook setup differences that I'm unaware of? Mine is a standalone computer running Microsoft Office 2010.

Anyway - thank you very much indeed.
I think my problem is solved.


Code:
Sub testpath()

    Dim RDO As Redemption.RDOSession
    Dim Store As Redemption.RDOStore

    Set RDO = CreateObject("Redemption.RDOSession")
    RDO.Logon

    For Each Store In RDO.Stores
      If (Store.StoreKind = skPstAnsi) Or (Store.StoreKind = skPstUnicode) Then
        Debug.Print Store.Name & " - " & Store.PstPath
      ElseIf (Store.StoreKind = skPrimaryExchangeMailbox) Then
        Debug.Print Store.Name & " - " & Store.OstPath
      ElseIf (Store.StoreKind = skIMAP4) Then
        Debug.Print Store.Name & " - " & "IMAP"
        
        ' Geoff added this:
        ' The following code line returns the hard-disc
        ' path to the PST file that stores gmail emails:
        Debug.Print Store.Name & " - " & Store.PstPath
        
      End If
    Next
    
    RDO.Logoff
    Set RDO = Nothing

End Sub
 
Thread starter Similar threads Forum Replies Date
David Langer Store my Outlook settings in the cloud - Broken Using Outlook 4
R "Can't store Outlook data files under the AppData folder. Please choose another folder." Using Outlook 6
R Can not create folder to store specific emails in in Outlook for Mac Using Outlook 1
Diane Poremsky The Best Outlook Store Add-ins Contest New Slipstick.com Articles 0
Diane Poremsky Can you store a pst file on an SD card? New Slipstick.com Articles 0
V Installing Apps from MS Online Store Using Outlook 5
T Importing OE6 e-mail to Outlook via Store Folder Using Outlook 9
A Exception message: MapiExceptionLogonFailed: Unable to open message store Exchange Server Administration 1
J iCloud Calendar/Contacts Syncing Hangs At End - aplzod Data Store Not Created Using Outlook 8
J Problems starting Information Store Server in Exchange 2003 Exchange Server Administration 13
P where can i store hyper links so that they aren't detected as a threat to the computer Using Outlook 2
D Sending mail from an IMAP account does not store sent mail on the correct folder Using Outlook 1
M Event 9877, MSExchangeISMailbox Store Exchange Server Administration 5
R Cannot start Exchange Information Store Exchange Server Administration 3
A Exchange 2010 DB - Unable to communicate with the Information Store to coordinate log truncation Exchange Server Administration 0
J BCM - The set of folders cannot be opened. Store not configured. Using Outlook 5
B Recovering Mailbox data - no mailboxes listed to restore in recovery mail store Exchange Server Administration 6
S The public folder store where the offline address book is hosted was not detected. The hosting serve Exchange Server Administration 11
R Adding a account to Admin Role for message store Exchange Server Administration 1
K How many old e-mails can Outlook 2010 store, access, and manage? Megabytes or Gigabytes? Using Outlook 2
M EX2007 - EX2010 - Public Folder Migration, some items are missing with MSExchange Store Driver 1020 Exchange Server Administration 1
O Outlook 2010 does not store password Using Outlook 1
M Information store will not mount Exchange Server Administration 3
A I receive the following: UID STORE failed: UID sequence range syntax error Using Outlook 2
N The Microsoft Exchange Information Store service terminated unexpectedly Exchange Server Administration 1
L Outlook 2010 help: "Information Store"??? Using Outlook 1
S Microsoft Exchange Information Store Using Outlook 2
M Default store couold not be opened Exchange Server Administration 6
T Event ID 1029 MSExchange Store Driver Exchange Server Administration 2
M when acessing Ebay to answer questions, internet explorer aborts. please help as I can not run my store. thank you Using Outlook 1
S How does Outlook store the location of mounted PSTs? Using Outlook 4
P Setting up Exchange mail & POP3 mailbox in a single store Using Outlook 2
M Sharing public folder store to non-exchange clients Using Outlook 3
W Exchange 2010 - Mailbox Store too large Exchange Server Administration 3
T Database Store Mount Failure Exchange Server Administration 19
R Store an appointment in the correct calendar Using Outlook 1
B OUTLOOK WONT OPEN CANNOT CONNECT TO DEFAULT EMAIL STORE CLOSED Using Outlook 1
O Where to store Calendar information? Using Outlook 4
R I am not able to use links inside of emails. Such as an ad in a store's email, I can not use the link to go to the internet. I am giving a statement Using Outlook 1
S Event ID 10026 - MSExchangeIS shutting down the Exchange Store Exchange Server Administration 7
J Administer Information Store Exchange Server Administration 3
V Unable to see Exchange 2010 Information Store when browsing the BackupExec selection list. Exchange Server Administration 9
F Error mounting mailbox store 0x6d9 Exchange Server Administration 4
J Outlook 2010 Store Folder -- Change Location Using Outlook 2
J Microsoft Office 2010: cannot open your default e-mail folders. The information store could not be o Using Outlook 1
F Store downloaded images locally Using Outlook 1
S Sync outlook 2010 with BB - error: ' No available message store' Using Outlook 3
I Information Store (####) A significant portion of the database buffer cache has been written out to Exchange Server Administration 5
D Exchange 2010 and Store.exe Exchange Server Administration 2
A Outlook 2010 : Ability to configure where Outlook gets the photo for the 'contact card' (i.e. dont store in the GAL) Using Outlook 4
Similar threads


















































Top