![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi,
I'm using the code I found he http://www.outlookcode.com/codedetail.aspx?id=962 to open a local PST file - works great. However, once I'm finished working with the PST file, I want to close it again so that it no longer appears in Outlook. I've tried modifying the code above as follows: Dim mobjOL As Outlook.Application Dim mobjNS As Outlook.NameSpace Dim mobjFolder As Outlook.MAPIFolder Sub TestSetNewStore2() Dim newStore As Outlook.MAPIFolder On Error Resume Next Set newStore = SetNewStore2("C:\MyNewStore.pst", "My New Store Folders") ' unfinished - folder processing goes here... mobjNS.RemoveStore newStore ' new line to try to close the newStore folders Set newStore = Nothing End Sub This doesn't cause any runtime errors, but doesn't actually close the PST file. I'm obviously missing something fairly fundamental... Any assistance gratefully received. Mark |
#2
|
|||
|
|||
![]()
"Mark Rae" wrote in message
... I'm obviously missing something fairly fundamental... Yeah, like a missing comma...! Apologies for the waste of bandwidth... :-( |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"not a personal folders file (.pst)" opening backup Outlook.pst | JimmyZ | Outlook - Installation | 10 | July 28th 06 05:32 PM |
pst file option missing under new outlook data file dialog | UncleBuckle | Outlook - Installation | 2 | February 25th 06 12:49 AM |
What's the right way to import a PST file? | Michael Levin | Outlook - General Queries | 8 | February 21st 06 03:04 PM |
backing up a .pst file - another process has locked a portion of the file? | [email protected] | Outlook - General Queries | 1 | February 19th 06 04:44 AM |
getting error: this .pst file is not a valid personal folder file | jen98 | Outlook - Installation | 1 | February 2nd 06 12:37 AM |