|
|
Hello,
I am new in Office programming. Sorry if I will repeat with my question, but after long searches, I couldn't find a solution to my problem. Problem: I am developing shared add - ins for MS Outlook 2003, my application will create *.pst file with calendar folder and that *.pst file will publish on server (Not Exchange server). But after i publish *.pst file on server user B, cannot view this file, because is locked. I used RemoveStore method to remove a folder, but it didn't solve my problem. How can I solve my problem?
Thank you so much Reda
PS. I don't like any commercial 3rd parties tools.
|
|
This is normal and expected behavior. Even after it is removed from a session, a .pst file remains locked until the current Outlook session is completely terminated. You might want to rethink your application's use of .pst files.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54
"Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com...
[Quoted Text] > Hello, > > I am new in Office programming. Sorry if I will repeat with my question, but > after long searches, I couldn't find a solution to my problem. > Problem: I am developing shared add - ins for MS Outlook 2003, my > application will create *.pst file with calendar folder and that *.pst file > will publish on server (Not Exchange server). But after i publish *.pst file > on server user B, cannot view this file, because is locked. I used > RemoveStore method to remove a folder, but it didn't solve my problem. > How can I solve my problem? > > Thank you so much > Reda > > PS. I don't like any commercial 3rd parties tools.
|
|
By default, PST provider keeps a PST file referenced and loaded for 30 minutes. Or until the PST provider dll itself gets unloaded (e.g. when the host process terminates). You might want to play with the registry key mentioned in http://support.microsoft.com/Default.aspx?kbid=222328
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
"Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com...
[Quoted Text] > Hello, > > I am new in Office programming. Sorry if I will repeat with my question, > but > after long searches, I couldn't find a solution to my problem. > Problem: I am developing shared add - ins for MS Outlook 2003, my > application will create *.pst file with calendar folder and that *.pst > file > will publish on server (Not Exchange server). But after i publish *.pst > file > on server user B, cannot view this file, because is locked. I used > RemoveStore method to remove a folder, but it didn't solve my problem. > How can I solve my problem? > > Thank you so much > Reda > > PS. I don't like any commercial 3rd parties tools.
|
|
Thanks so much for quick response, but the problem is a locked file during the Outlook session. I can't completely to delete *.pst folder. I know that I have to use <Folder>.Delete() method, but I can't. I've heard about Extended MAPI, but I am not really familiar with C or C++, do you have any papers or articles or solutions examples for this problem. Thank you so much.
Reda
Dmitry Streblechenko raš :
[Quoted Text] > By default, PST provider keeps a PST file referenced and loaded for 30 > minutes. Or until the PST provider dll itself gets unloaded (e.g. when the > host process terminates). You might want to play with the registry key > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > Hello, > > > > I am new in Office programming. Sorry if I will repeat with my question, > > but > > after long searches, I couldn't find a solution to my problem. > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > application will create *.pst file with calendar folder and that *.pst > > file > > will publish on server (Not Exchange server). But after i publish *.pst > > file > > on server user B, cannot view this file, because is locked. I used > > RemoveStore method to remove a folder, but it didn't solve my problem. > > How can I solve my problem? > > > > Thank you so much > > Reda > > > > PS. I don't like any commercial 3rd parties tools.
|
|
I don't see what the problem is - you set that registry key, add a new PST store using Namespace.AddStore, then call Namespace.RemoveStore. The PST file should be released. Is that not the case?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... Thanks so much for quick response, but the problem is a locked file during the Outlook session. I can't completely to delete *.pst folder. I know that I have to use <Folder>.Delete() method, but I can't. I've heard about Extended MAPI, but I am not really familiar with C or C++, do you have any papers or articles or solutions examples for this problem. Thank you so much.
Reda
Dmitry Streblechenko ras :
[Quoted Text] > By default, PST provider keeps a PST file referenced and loaded for 30 > minutes. Or until the PST provider dll itself gets unloaded (e.g. when the > host process terminates). You might want to play with the registry key > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > Hello, > > > > I am new in Office programming. Sorry if I will repeat with my question, > > but > > after long searches, I couldn't find a solution to my problem. > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > application will create *.pst file with calendar folder and that *.pst > > file > > will publish on server (Not Exchange server). But after i publish *.pst > > file > > on server user B, cannot view this file, because is locked. I used > > RemoveStore method to remove a folder, but it didn't solve my problem. > > How can I solve my problem? > > > > Thank you so much > > Reda > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Well, maybe a problem is with releasing a *.pst file. I set up that registry key, I added new PST store using Namespace.AddStore, then call Namespace.RemoveStore. but PST file didn't released during Outlook Session. Also, I would like to mention that *.PST files store on Network folder.
Sorry for my dummy question, maybe that problem is that Outlook session is running?
How to solve this problem without exiting Outlook?
Thanks so much.
Reda
Dmitry Streblechenko raš :
[Quoted Text] > I don't see what the problem is - you set that registry key, add a new PST > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > file should be released. Is that not the case? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > Thanks so much for quick response, but the problem is a locked file > during the Outlook session. I can't completely to delete *.pst folder. > I know that I have to use <Folder>.Delete() method, but I can't. I've > heard about Extended MAPI, but I am not really familiar with C or C++, > do you have any papers or articles or solutions examples for this > problem. > Thank you so much. > > Reda > > Dmitry Streblechenko ras : > > By default, PST provider keeps a PST file referenced and loaded for 30 > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when the > > host process terminates). You might want to play with the registry key > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > Hello, > > > > > > I am new in Office programming. Sorry if I will repeat with my question, > > > but > > > after long searches, I couldn't find a solution to my problem. > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > application will create *.pst file with calendar folder and that *.pst > > > file > > > will publish on server (Not Exchange server). But after i publish *.pst > > > file > > > on server user B, cannot view this file, because is locked. I used > > > RemoveStore method to remove a folder, but it didn't solve my problem. > > > How can I solve my problem? > > > > > > Thank you so much > > > Reda > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Do you see that PST store removed from Outlook when you call RemoveStore?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... Well, maybe a problem is with releasing a *.pst file. I set up that registry key, I added new PST store using Namespace.AddStore, then call Namespace.RemoveStore. but PST file didn't released during Outlook Session. Also, I would like to mention that *.PST files store on Network folder.
Sorry for my dummy question, maybe that problem is that Outlook session is running?
How to solve this problem without exiting Outlook?
Thanks so much.
Reda
Dmitry Streblechenko ras :
[Quoted Text] > I don't see what the problem is - you set that registry key, add a new PST > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > file should be released. Is that not the case? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > Thanks so much for quick response, but the problem is a locked file > during the Outlook session. I can't completely to delete *.pst folder. > I know that I have to use <Folder>.Delete() method, but I can't. I've > heard about Extended MAPI, but I am not really familiar with C or C++, > do you have any papers or articles or solutions examples for this > problem. > Thank you so much. > > Reda > > Dmitry Streblechenko ras : > > By default, PST provider keeps a PST file referenced and loaded for 30 > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when > > the > > host process terminates). You might want to play with the registry key > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > Hello, > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > question, > > > but > > > after long searches, I couldn't find a solution to my problem. > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > application will create *.pst file with calendar folder and that *.pst > > > file > > > will publish on server (Not Exchange server). But after i publish > > > *.pst > > > file > > > on server user B, cannot view this file, because is locked. I used > > > RemoveStore method to remove a folder, but it didn't solve my problem. > > > How can I solve my problem? > > > > > > Thank you so much > > > Reda > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Yes, PST store folder has been removed, but a problem is *.pst file hasn't been released durring Outlook session. This is a problem.
Thank you,
Reda
Dmitry Streblechenko raš :
[Quoted Text] > Do you see that PST store removed from Outlook when you call RemoveStore? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > Well, maybe a problem is with releasing a *.pst file. I set up that > registry key, I added new PST store using Namespace.AddStore, then > call Namespace.RemoveStore. but PST file didn't released during > Outlook Session. > Also, I would like to mention that *.PST files store on Network > folder. > > Sorry for my dummy question, maybe that problem is that Outlook > session is running? > > How to solve this problem without exiting Outlook? > > Thanks so much. > > Reda > > > Dmitry Streblechenko ras : > > I don't see what the problem is - you set that registry key, add a new PST > > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > > file should be released. Is that not the case? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > Thanks so much for quick response, but the problem is a locked file > > during the Outlook session. I can't completely to delete *.pst folder. > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > heard about Extended MAPI, but I am not really familiar with C or C++, > > do you have any papers or articles or solutions examples for this > > problem. > > Thank you so much. > > > > Reda > > > > Dmitry Streblechenko ras : > > > By default, PST provider keeps a PST file referenced and loaded for 30 > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when > > > the > > > host process terminates). You might want to play with the registry key > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > Hello, > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > question, > > > > but > > > > after long searches, I couldn't find a solution to my problem. > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > application will create *.pst file with calendar folder and that *.pst > > > > file > > > > will publish on server (Not Exchange server). But after i publish > > > > *.pst > > > > file > > > > on server user B, cannot view this file, because is locked. I used > > > > RemoveStore method to remove a folder, but it didn't solve my problem. > > > > How can I solve my problem? > > > > > > > > Thank you so much > > > > Reda > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
What is your code? Did you create the right registry key? The article talks about Outlook 2000, that is what "9.0" in the key name refers to. In case of Outlook 2002, it should be "10.0", Outlook 2003 - "11.0", etc. Try to display a message box immediatley after calling RemoveStore and before deleting the PST file to let the Windows message loop run.
Just out of curiosity, why do you create a PST file if you want to delete it?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... Yes, PST store folder has been removed, but a problem is *.pst file hasn't been released durring Outlook session. This is a problem.
Thank you,
Reda
Dmitry Streblechenko ras :
[Quoted Text] > Do you see that PST store removed from Outlook when you call RemoveStore? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > Well, maybe a problem is with releasing a *.pst file. I set up that > registry key, I added new PST store using Namespace.AddStore, then > call Namespace.RemoveStore. but PST file didn't released during > Outlook Session. > Also, I would like to mention that *.PST files store on Network > folder. > > Sorry for my dummy question, maybe that problem is that Outlook > session is running? > > How to solve this problem without exiting Outlook? > > Thanks so much. > > Reda > > > Dmitry Streblechenko ras : > > I don't see what the problem is - you set that registry key, add a new > > PST > > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > > file should be released. Is that not the case? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > Thanks so much for quick response, but the problem is a locked file > > during the Outlook session. I can't completely to delete *.pst folder. > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > heard about Extended MAPI, but I am not really familiar with C or C++, > > do you have any papers or articles or solutions examples for this > > problem. > > Thank you so much. > > > > Reda > > > > Dmitry Streblechenko ras : > > > By default, PST provider keeps a PST file referenced and loaded for 30 > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when > > > the > > > host process terminates). You might want to play with the registry key > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > Hello, > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > question, > > > > but > > > > after long searches, I couldn't find a solution to my problem. > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > application will create *.pst file with calendar folder and that > > > > *.pst > > > > file > > > > will publish on server (Not Exchange server). But after i publish > > > > *.pst > > > > file > > > > on server user B, cannot view this file, because is locked. I used > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > problem. > > > > How can I solve my problem? > > > > > > > > Thank you so much > > > > Reda > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Think the Issue that Reda has is that even though she puts in the "PSTDisconnect" registry key value to decrease the amount of time Outlook, this registry value is not actually read until the next time Outlook starts. So, the scenario is that a current Outlook session is open, and it was started BEFORE the "PSTDisconnect" value was in place, so the Outlook session uses the default value of 30 minutes. Reda's script probably puts the "PSTDisconnect" value in place, then runs the "RemoveStore" method. The issue is of course the current Outlook session has no awareness of this registry values existence, so it will still keep a file lock on it for 30 minutes.
If the Outlook session was restarted, THEN the PSTDisconnect value is read, and the file will be released within the interval that Reda set in her code.
I just reproduced this scenario on my machine.
"Dmitry Streblechenko" wrote:
[Quoted Text] > What is your code? > Did you create the right registry key? The article talks about Outlook 2000, > that is what "9.0" in the key name refers to. In case of Outlook 2002, it > should be "10.0", Outlook 2003 - "11.0", etc. > Try to display a message box immediatley after calling RemoveStore and > before deleting the PST file to let the Windows message loop run. > > Just out of curiosity, why do you create a PST file if you want to delete > it? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > Yes, PST store folder has been removed, but a problem is *.pst file > hasn't been released durring Outlook session. > This is a problem. > > Thank you, > > Reda > > Dmitry Streblechenko ras : > > Do you see that PST store removed from Outlook when you call RemoveStore? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > Well, maybe a problem is with releasing a *.pst file. I set up that > > registry key, I added new PST store using Namespace.AddStore, then > > call Namespace.RemoveStore. but PST file didn't released during > > Outlook Session. > > Also, I would like to mention that *.PST files store on Network > > folder. > > > > Sorry for my dummy question, maybe that problem is that Outlook > > session is running? > > > > How to solve this problem without exiting Outlook? > > > > Thanks so much. > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > I don't see what the problem is - you set that registry key, add a new > > > PST > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > > > file should be released. Is that not the case? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > Thanks so much for quick response, but the problem is a locked file > > > during the Outlook session. I can't completely to delete *.pst folder. > > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > > heard about Extended MAPI, but I am not really familiar with C or C++, > > > do you have any papers or articles or solutions examples for this > > > problem. > > > Thank you so much. > > > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > > By default, PST provider keeps a PST file referenced and loaded for 30 > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when > > > > the > > > > host process terminates). You might want to play with the registry key > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > Hello, > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > question, > > > > > but > > > > > after long searches, I couldn't find a solution to my problem. > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > > application will create *.pst file with calendar folder and that > > > > > *.pst > > > > > file > > > > > will publish on server (Not Exchange server). But after i publish > > > > > *.pst > > > > > file > > > > > on server user B, cannot view this file, because is locked. I used > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > problem. > > > > > How can I solve my problem? > > > > > > > > > > Thank you so much > > > > > Reda > > > > > > > > > > PS. I don't like any commercial 3rd parties tools. > > >
|
|
I meant to say: I think the Issue that Reda has is that even though she puts in the "PSTDisconnect" registry key value to decrease the amount of time Outlook holds the file open, this registry value is not actually read until the next time Outlook starts.
"Brendan" wrote:
[Quoted Text] > Think the Issue that Reda has is that even though she puts in the > "PSTDisconnect" registry key value to decrease the amount of time Outlook, > this registry value is not actually read until the next time Outlook starts. > So, the scenario is that a current Outlook session is open, and it was > started BEFORE the "PSTDisconnect" value was in place, so the Outlook session > uses the default value of 30 minutes. Reda's script probably puts the > "PSTDisconnect" value in place, then runs the "RemoveStore" method. The > issue is of course the current Outlook session has no awareness of this > registry values existence, so it will still keep a file lock on it for 30 > minutes. > > If the Outlook session was restarted, THEN the PSTDisconnect value is read, > and the file will be released within the interval that Reda set in her code. > > I just reproduced this scenario on my machine. > > "Dmitry Streblechenko" wrote: > > > What is your code? > > Did you create the right registry key? The article talks about Outlook 2000, > > that is what "9.0" in the key name refers to. In case of Outlook 2002, it > > should be "10.0", Outlook 2003 - "11.0", etc. > > Try to display a message box immediatley after calling RemoveStore and > > before deleting the PST file to let the Windows message loop run. > > > > Just out of curiosity, why do you create a PST file if you want to delete > > it? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > Yes, PST store folder has been removed, but a problem is *.pst file > > hasn't been released durring Outlook session. > > This is a problem. > > > > Thank you, > > > > Reda > > > > Dmitry Streblechenko ras : > > > Do you see that PST store removed from Outlook when you call RemoveStore? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > Well, maybe a problem is with releasing a *.pst file. I set up that > > > registry key, I added new PST store using Namespace.AddStore, then > > > call Namespace.RemoveStore. but PST file didn't released during > > > Outlook Session. > > > Also, I would like to mention that *.PST files store on Network > > > folder. > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > session is running? > > > > > > How to solve this problem without exiting Outlook? > > > > > > Thanks so much. > > > > > > Reda > > > > > > > > > Dmitry Streblechenko ras : > > > > I don't see what the problem is - you set that registry key, add a new > > > > PST > > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > > > > file should be released. Is that not the case? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > Thanks so much for quick response, but the problem is a locked file > > > > during the Outlook session. I can't completely to delete *.pst folder. > > > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > > > heard about Extended MAPI, but I am not really familiar with C or C++, > > > > do you have any papers or articles or solutions examples for this > > > > problem. > > > > Thank you so much. > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > By default, PST provider keeps a PST file referenced and loaded for 30 > > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when > > > > > the > > > > > host process terminates). You might want to play with the registry key > > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > Hello, > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > > question, > > > > > > but > > > > > > after long searches, I couldn't find a solution to my problem. > > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > > > application will create *.pst file with calendar folder and that > > > > > > *.pst > > > > > > file > > > > > > will publish on server (Not Exchange server). But after i publish > > > > > > *.pst > > > > > > file > > > > > > on server user B, cannot view this file, because is locked. I used > > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > > problem. > > > > > > How can I solve my problem? > > > > > > > > > > > > Thank you so much > > > > > > Reda > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools. > > > > > >
|
|
Thank you all for suggestions. I set up manually a registry key for Outlook 2003("11.0"), as it said in this article. It seems that *.pst file is released, but another bug cames up "Outlook failed to add personal store file to this session". I get this error then call method AddStore again.
My scenario is: I have app, where I have button "Publish calendar on network", so when I click on this button, I check is <CurrentUser>.pst exists. If exists, I delete that file, after that I call method namespace.AddStore(path). Here I got an error. Outlook failed to add personal store file to this session".
Any suggestions?
Thank you again.
Reda
Dmitry Streblechenko raš :
[Quoted Text] > What is your code? > Did you create the right registry key? The article talks about Outlook 2000, > that is what "9.0" in the key name refers to. In case of Outlook 2002, it > should be "10.0", Outlook 2003 - "11.0", etc. > Try to display a message box immediatley after calling RemoveStore and > before deleting the PST file to let the Windows message loop run. > > Just out of curiosity, why do you create a PST file if you want to delete > it? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > Yes, PST store folder has been removed, but a problem is *.pst file > hasn't been released durring Outlook session. > This is a problem. > > Thank you, > > Reda > > Dmitry Streblechenko ras : > > Do you see that PST store removed from Outlook when you call RemoveStore? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > Well, maybe a problem is with releasing a *.pst file. I set up that > > registry key, I added new PST store using Namespace.AddStore, then > > call Namespace.RemoveStore. but PST file didn't released during > > Outlook Session. > > Also, I would like to mention that *.PST files store on Network > > folder. > > > > Sorry for my dummy question, maybe that problem is that Outlook > > session is running? > > > > How to solve this problem without exiting Outlook? > > > > Thanks so much. > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > I don't see what the problem is - you set that registry key, add a new > > > PST > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The PST > > > file should be released. Is that not the case? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > Thanks so much for quick response, but the problem is a locked file > > > during the Outlook session. I can't completely to delete *.pst folder. > > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > > heard about Extended MAPI, but I am not really familiar with C or C++, > > > do you have any papers or articles or solutions examples for this > > > problem. > > > Thank you so much. > > > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > > By default, PST provider keeps a PST file referenced and loaded for 30 > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. when > > > > the > > > > host process terminates). You might want to play with the registry key > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > Hello, > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > question, > > > > > but > > > > > after long searches, I couldn't find a solution to my problem. > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > > application will create *.pst file with calendar folder and that > > > > > *.pst > > > > > file > > > > > will publish on server (Not Exchange server). But after i publish > > > > > *.pst > > > > > file > > > > > on server user B, cannot view this file, because is locked. I used > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > problem. > > > > > How can I solve my problem? > > > > > > > > > > Thank you so much > > > > > Reda > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
What do you delete the whole PST file rather than its contents?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... Thank you all for suggestions. I set up manually a registry key for Outlook 2003("11.0"), as it said in this article. It seems that *.pst file is released, but another bug cames up "Outlook failed to add personal store file to this session". I get this error then call method AddStore again.
My scenario is: I have app, where I have button "Publish calendar on network", so when I click on this button, I check is <CurrentUser>.pst exists. If exists, I delete that file, after that I call method namespace.AddStore(path). Here I got an error. Outlook failed to add personal store file to this session".
Any suggestions?
Thank you again.
Reda
Dmitry Streblechenko ras :
[Quoted Text] > What is your code? > Did you create the right registry key? The article talks about Outlook > 2000, > that is what "9.0" in the key name refers to. In case of Outlook 2002, it > should be "10.0", Outlook 2003 - "11.0", etc. > Try to display a message box immediatley after calling RemoveStore and > before deleting the PST file to let the Windows message loop run. > > Just out of curiosity, why do you create a PST file if you want to delete > it? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > Yes, PST store folder has been removed, but a problem is *.pst file > hasn't been released durring Outlook session. > This is a problem. > > Thank you, > > Reda > > Dmitry Streblechenko ras : > > Do you see that PST store removed from Outlook when you call > > RemoveStore? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > Well, maybe a problem is with releasing a *.pst file. I set up that > > registry key, I added new PST store using Namespace.AddStore, then > > call Namespace.RemoveStore. but PST file didn't released during > > Outlook Session. > > Also, I would like to mention that *.PST files store on Network > > folder. > > > > Sorry for my dummy question, maybe that problem is that Outlook > > session is running? > > > > How to solve this problem without exiting Outlook? > > > > Thanks so much. > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > I don't see what the problem is - you set that registry key, add a new > > > PST > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The > > > PST > > > file should be released. Is that not the case? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > Thanks so much for quick response, but the problem is a locked file > > > during the Outlook session. I can't completely to delete *.pst folder. > > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > > heard about Extended MAPI, but I am not really familiar with C or C++, > > > do you have any papers or articles or solutions examples for this > > > problem. > > > Thank you so much. > > > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > > By default, PST provider keeps a PST file referenced and loaded for > > > > 30 > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. > > > > when > > > > the > > > > host process terminates). You might want to play with the registry > > > > key > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > Hello, > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > question, > > > > > but > > > > > after long searches, I couldn't find a solution to my problem. > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > > application will create *.pst file with calendar folder and that > > > > > *.pst > > > > > file > > > > > will publish on server (Not Exchange server). But after i publish > > > > > *.pst > > > > > file > > > > > on server user B, cannot view this file, because is locked. I used > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > problem. > > > > > How can I solve my problem? > > > > > > > > > > Thank you so much > > > > > Reda > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
I delete the whole PST file file first, then I do AddStore(). So my personal profile will renew. Am I doing something wrong.
Thanks alot.
Here is a piece of code: .... NameSpace outlookNS = applicationObject.GetNamespace("MAPI"); Explorer exp = applicationObject.ActiveExplorer(); MAPIFolder rootFolder = outlookNS.Folders[1]; MAPIFolder objFolder = outlookNS.Folders.GetLast(); string path = PathP + outlookNS.CurrentUser.Name + ".pst"; if (System.IO.File.Exists(path)) { System.IO.File.Delete(path); } objFolder = null; outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + ".pst"); objFolder = outlookNS.Folders.GetLast(); objFolder.Name = outlookNS.CurrentUser.Name + " Calendars"; calendarFolder.CopyTo(objFolder); foreach (MAPIFolder folder in objFolder.Folders) { if (folder.Name == "Calendar") { folder.Name = outlookNS.CurrentUser.Name + ""; break; } } outlookNS.RemoveStore(objFolder); MessageBox.Show("Publish date: " + System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + ".pst"),"Message"); outlookNS = null; objFolder = null; exp = null;
.....
Reda
Dmitry Streblechenko raš :
[Quoted Text] > What do you delete the whole PST file rather than its contents? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > Thank you all for suggestions. I set up manually a registry key for > Outlook 2003("11.0"), as it said in this article. > It seems that *.pst file is released, but another bug cames up > "Outlook failed to add personal store file to this session". I get > this error then call method AddStore again. > > My scenario is: I have app, where I have button "Publish calendar on > network", so when I click on this button, I check is <CurrentUser>.pst > exists. If exists, I delete that file, after that I call method > namespace.AddStore(path). > Here I got an error. Outlook failed to add personal store file to this > session". > > Any suggestions? > > Thank you again. > > Reda > > > Dmitry Streblechenko ras : > > What is your code? > > Did you create the right registry key? The article talks about Outlook > > 2000, > > that is what "9.0" in the key name refers to. In case of Outlook 2002, it > > should be "10.0", Outlook 2003 - "11.0", etc. > > Try to display a message box immediatley after calling RemoveStore and > > before deleting the PST file to let the Windows message loop run. > > > > Just out of curiosity, why do you create a PST file if you want to delete > > it? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > Yes, PST store folder has been removed, but a problem is *.pst file > > hasn't been released durring Outlook session. > > This is a problem. > > > > Thank you, > > > > Reda > > > > Dmitry Streblechenko ras : > > > Do you see that PST store removed from Outlook when you call > > > RemoveStore? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > Well, maybe a problem is with releasing a *.pst file. I set up that > > > registry key, I added new PST store using Namespace.AddStore, then > > > call Namespace.RemoveStore. but PST file didn't released during > > > Outlook Session. > > > Also, I would like to mention that *.PST files store on Network > > > folder. > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > session is running? > > > > > > How to solve this problem without exiting Outlook? > > > > > > Thanks so much. > > > > > > Reda > > > > > > > > > Dmitry Streblechenko ras : > > > > I don't see what the problem is - you set that registry key, add a new > > > > PST > > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The > > > > PST > > > > file should be released. Is that not the case? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > Thanks so much for quick response, but the problem is a locked file > > > > during the Outlook session. I can't completely to delete *.pst folder. > > > > I know that I have to use <Folder>.Delete() method, but I can't. I've > > > > heard about Extended MAPI, but I am not really familiar with C or C++, > > > > do you have any papers or articles or solutions examples for this > > > > problem. > > > > Thank you so much. > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > By default, PST provider keeps a PST file referenced and loaded for > > > > > 30 > > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. > > > > > when > > > > > the > > > > > host process terminates). You might want to play with the registry > > > > > key > > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > Hello, > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > > question, > > > > > > but > > > > > > after long searches, I couldn't find a solution to my problem. > > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, my > > > > > > application will create *.pst file with calendar folder and that > > > > > > *.pst > > > > > > file > > > > > > will publish on server (Not Exchange server). But after i publish > > > > > > *.pst > > > > > > file > > > > > > on server user B, cannot view this file, because is locked. I used > > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > > problem. > > > > > > How can I solve my problem? > > > > > > > > > > > > Thank you so much > > > > > > Reda > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
I meant "Why", not "What".
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... I delete the whole PST file file first, then I do AddStore(). So my personal profile will renew. Am I doing something wrong.
Thanks alot.
Here is a piece of code: .... NameSpace outlookNS = applicationObject.GetNamespace("MAPI"); Explorer exp = applicationObject.ActiveExplorer(); MAPIFolder rootFolder = outlookNS.Folders[1]; MAPIFolder objFolder = outlookNS.Folders.GetLast(); string path = PathP + outlookNS.CurrentUser.Name + ".pst"; if (System.IO.File.Exists(path)) { System.IO.File.Delete(path); } objFolder = null; outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + ".pst"); objFolder = outlookNS.Folders.GetLast(); objFolder.Name = outlookNS.CurrentUser.Name + " Calendars"; calendarFolder.CopyTo(objFolder); foreach (MAPIFolder folder in objFolder.Folders) { if (folder.Name == "Calendar") { folder.Name = outlookNS.CurrentUser.Name + ""; break; } } outlookNS.RemoveStore(objFolder); MessageBox.Show("Publish date: " + System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + ".pst"),"Message"); outlookNS = null; objFolder = null; exp = null;
.....
Reda
Dmitry Streblechenko ras :
[Quoted Text] > What do you delete the whole PST file rather than its contents? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > Thank you all for suggestions. I set up manually a registry key for > Outlook 2003("11.0"), as it said in this article. > It seems that *.pst file is released, but another bug cames up > "Outlook failed to add personal store file to this session". I get > this error then call method AddStore again. > > My scenario is: I have app, where I have button "Publish calendar on > network", so when I click on this button, I check is <CurrentUser>.pst > exists. If exists, I delete that file, after that I call method > namespace.AddStore(path). > Here I got an error. Outlook failed to add personal store file to this > session". > > Any suggestions? > > Thank you again. > > Reda > > > Dmitry Streblechenko ras : > > What is your code? > > Did you create the right registry key? The article talks about Outlook > > 2000, > > that is what "9.0" in the key name refers to. In case of Outlook 2002, > > it > > should be "10.0", Outlook 2003 - "11.0", etc. > > Try to display a message box immediatley after calling RemoveStore and > > before deleting the PST file to let the Windows message loop run. > > > > Just out of curiosity, why do you create a PST file if you want to > > delete > > it? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > Yes, PST store folder has been removed, but a problem is *.pst file > > hasn't been released durring Outlook session. > > This is a problem. > > > > Thank you, > > > > Reda > > > > Dmitry Streblechenko ras : > > > Do you see that PST store removed from Outlook when you call > > > RemoveStore? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > Well, maybe a problem is with releasing a *.pst file. I set up that > > > registry key, I added new PST store using Namespace.AddStore, then > > > call Namespace.RemoveStore. but PST file didn't released during > > > Outlook Session. > > > Also, I would like to mention that *.PST files store on Network > > > folder. > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > session is running? > > > > > > How to solve this problem without exiting Outlook? > > > > > > Thanks so much. > > > > > > Reda > > > > > > > > > Dmitry Streblechenko ras : > > > > I don't see what the problem is - you set that registry key, add a > > > > new > > > > PST > > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The > > > > PST > > > > file should be released. Is that not the case? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > Thanks so much for quick response, but the problem is a locked file > > > > during the Outlook session. I can't completely to delete *.pst > > > > folder. > > > > I know that I have to use <Folder>.Delete() method, but I can't. > > > > I've > > > > heard about Extended MAPI, but I am not really familiar with C or > > > > C++, > > > > do you have any papers or articles or solutions examples for this > > > > problem. > > > > Thank you so much. > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > By default, PST provider keeps a PST file referenced and loaded > > > > > for > > > > > 30 > > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. > > > > > when > > > > > the > > > > > host process terminates). You might want to play with the registry > > > > > key > > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > Hello, > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > > question, > > > > > > but > > > > > > after long searches, I couldn't find a solution to my problem. > > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, > > > > > > my > > > > > > application will create *.pst file with calendar folder and that > > > > > > *.pst > > > > > > file > > > > > > will publish on server (Not Exchange server). But after i > > > > > > publish > > > > > > *.pst > > > > > > file > > > > > > on server user B, cannot view this file, because is locked. I > > > > > > used > > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > > problem. > > > > > > How can I solve my problem? > > > > > > > > > > > > Thank you so much > > > > > > Reda > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Thanks, Dmitry, I have solved my problem by deleting particular folder. But here is another problem came up: I would like to add *pst file on the end of folder treeview like this: +--Personal Folders +---Hotmail +--Alex Calendars +--Reda Calendars
I am getting this:
+--Personal Folders +--Alex Calendars +---Hotmail +--Reda Calendars
It seems that Outlook sorts in alphabetical order, Is it a way to change it?
Thanks alot again, Reda
Dmitry Streblechenko raš :
[Quoted Text] > I meant "Why", not "What". > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > I delete the whole PST file file first, then I do AddStore(). So my > personal profile will renew. Am I doing something wrong. > > Thanks alot. > > Here is a piece of code: > ... > NameSpace outlookNS = > applicationObject.GetNamespace("MAPI"); > Explorer exp = applicationObject.ActiveExplorer(); > MAPIFolder rootFolder = outlookNS.Folders[1]; > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > string path = PathP + outlookNS.CurrentUser.Name + ".pst"; > if (System.IO.File.Exists(path)) > { > System.IO.File.Delete(path); > } > objFolder = null; > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > ".pst"); > objFolder = outlookNS.Folders.GetLast(); > objFolder.Name = outlookNS.CurrentUser.Name + " > Calendars"; > calendarFolder.CopyTo(objFolder); > foreach (MAPIFolder folder in objFolder.Folders) > { > if (folder.Name == "Calendar") > { > folder.Name = outlookNS.CurrentUser.Name + ""; > break; > } > } > outlookNS.RemoveStore(objFolder); > MessageBox.Show("Publish date: " + > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + > ".pst"),"Message"); > outlookNS = null; > objFolder = null; > exp = null; > > .... > > Reda > > Dmitry Streblechenko ras : > > What do you delete the whole PST file rather than its contents? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > Thank you all for suggestions. I set up manually a registry key for > > Outlook 2003("11.0"), as it said in this article. > > It seems that *.pst file is released, but another bug cames up > > "Outlook failed to add personal store file to this session". I get > > this error then call method AddStore again. > > > > My scenario is: I have app, where I have button "Publish calendar on > > network", so when I click on this button, I check is <CurrentUser>.pst > > exists. If exists, I delete that file, after that I call method > > namespace.AddStore(path). > > Here I got an error. Outlook failed to add personal store file to this > > session". > > > > Any suggestions? > > > > Thank you again. > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > What is your code? > > > Did you create the right registry key? The article talks about Outlook > > > 2000, > > > that is what "9.0" in the key name refers to. In case of Outlook 2002, > > > it > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > Try to display a message box immediatley after calling RemoveStore and > > > before deleting the PST file to let the Windows message loop run. > > > > > > Just out of curiosity, why do you create a PST file if you want to > > > delete > > > it? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > Yes, PST store folder has been removed, but a problem is *.pst file > > > hasn't been released durring Outlook session. > > > This is a problem. > > > > > > Thank you, > > > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > > Do you see that PST store removed from Outlook when you call > > > > RemoveStore? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > Well, maybe a problem is with releasing a *.pst file. I set up that > > > > registry key, I added new PST store using Namespace.AddStore, then > > > > call Namespace.RemoveStore. but PST file didn't released during > > > > Outlook Session. > > > > Also, I would like to mention that *.PST files store on Network > > > > folder. > > > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > > session is running? > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > Thanks so much. > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > I don't see what the problem is - you set that registry key, add a > > > > > new > > > > > PST > > > > > store using Namespace.AddStore, then call Namespace.RemoveStore. The > > > > > PST > > > > > file should be released. Is that not the case? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > Thanks so much for quick response, but the problem is a locked file > > > > > during the Outlook session. I can't completely to delete *.pst > > > > > folder. > > > > > I know that I have to use <Folder>.Delete() method, but I can't. > > > > > I've > > > > > heard about Extended MAPI, but I am not really familiar with C or > > > > > C++, > > > > > do you have any papers or articles or solutions examples for this > > > > > problem. > > > > > Thank you so much. > > > > > > > > > > Reda > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > By default, PST provider keeps a PST file referenced and loaded > > > > > > for > > > > > > 30 > > > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. > > > > > > when > > > > > > the > > > > > > host process terminates). You might want to play with the registry > > > > > > key > > > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > Hello, > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > > > question, > > > > > > > but > > > > > > > after long searches, I couldn't find a solution to my problem. > > > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, > > > > > > > my > > > > > > > application will create *.pst file with calendar folder and that > > > > > > > *.pst > > > > > > > file > > > > > > > will publish on server (Not Exchange server). But after i > > > > > > > publish > > > > > > > *.pst > > > > > > > file > > > > > > > on server user B, cannot view this file, because is locked. I > > > > > > > used > > > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > > > problem. > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > Thank you so much > > > > > > > Reda > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
I found it that I can't set folder list the way as I was added to Folder list. Right now the problem is to display Calendar folder, for example in Folder "Alex Calendars". My scenario is: I am adding programmically to folder list, let say Alex.pst file, then I do this.ActiveExplorer().Currentfolder = calendarfolder; this.ActiveExplorer().Display(); but Alex "Calendar" won't Display. Instead of this CurrentView set on "Inbox". But I adding Reda.pst file, everything works fine. I guess the problem is because Alex Calendars folder is not last on treeview.
Thanks for suggestions.
Reda
reda...[ at ]gmail.com raðë:
[Quoted Text] > Thanks, Dmitry, I have solved my problem by deleting particular > folder. But here is another problem came up: > I would like to add *pst file on the end of folder treeview like this: > +--Personal Folders > +---Hotmail > +--Alex Calendars > +--Reda Calendars > > I am getting this: > > +--Personal Folders > +--Alex Calendars > +---Hotmail > +--Reda Calendars > > It seems that Outlook sorts in alphabetical order, Is it a way to > change it? > > Thanks alot again, > Reda > > Dmitry Streblechenko rað : > > I meant "Why", not "What". > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > > I delete the whole PST file file first, then I do AddStore(). So my > > personal profile will renew. Am I doing something wrong. > > > > Thanks alot. > > > > Here is a piece of code: > > ... > > NameSpace outlookNS = > > applicationObject.GetNamespace("MAPI"); > > Explorer exp = applicationObject.ActiveExplorer(); > > MAPIFolder rootFolder = outlookNS.Folders[1]; > > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > > string path = PathP + outlookNS.CurrentUser.Name + ".pst"; > > if (System.IO.File.Exists(path)) > > { > > System.IO.File.Delete(path); > > } > > objFolder = null; > > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > > ".pst"); > > objFolder = outlookNS.Folders.GetLast(); > > objFolder.Name = outlookNS.CurrentUser.Name + " > > Calendars"; > > calendarFolder.CopyTo(objFolder); > > foreach (MAPIFolder folder in objFolder.Folders) > > { > > if (folder.Name == "Calendar") > > { > > folder.Name = outlookNS.CurrentUser.Name + ""; > > break; > > } > > } > > outlookNS.RemoveStore(objFolder); > > MessageBox.Show("Publish date: " + > > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + > > ".pst"),"Message"); > > outlookNS = null; > > objFolder = null; > > exp = null; > > > > .... > > > > Reda > > > > Dmitry Streblechenko ras : > > > What do you delete the whole PST file rather than its contents? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > > Thank you all for suggestions. I set up manually a registry key for > > > Outlook 2003("11.0"), as it said in this article. > > > It seems that *.pst file is released, but another bug cames up > > > "Outlook failed to add personal store file to this session". I get > > > this error then call method AddStore again. > > > > > > My scenario is: I have app, where I have button "Publish calendar on > > > network", so when I click on this button, I check is <CurrentUser>.pst > > > exists. If exists, I delete that file, after that I call method > > > namespace.AddStore(path). > > > Here I got an error. Outlook failed to add personal store file to this > > > session". > > > > > > Any suggestions? > > > > > > Thank you again. > > > > > > Reda > > > > > > > > > Dmitry Streblechenko ras : > > > > What is your code? > > > > Did you create the right registry key? The article talks about Outlook > > > > 2000, > > > > that is what "9.0" in the key name refers to. In case of Outlook 2002, > > > > it > > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > > Try to display a message box immediatley after calling RemoveStore and > > > > before deleting the PST file to let the Windows message loop run. > > > > > > > > Just out of curiosity, why do you create a PST file if you want to > > > > delete > > > > it? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > > Yes, PST store folder has been removed, but a problem is *.pst file > > > > hasn't been released durring Outlook session. > > > > This is a problem. > > > > > > > > Thank you, > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > Do you see that PST store removed from Outlook when you call > > > > > RemoveStore? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > > Well, maybe a problem is with releasing a *.pst file. I set up that > > > > > registry key, I added new PST store using Namespace.AddStore, then > > > > > call Namespace.RemoveStore. but PST file didn't released during > > > > > Outlook Session. > > > > > Also, I would like to mention that *.PST files store on Network > > > > > folder. > > > > > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > > > session is running? > > > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > > > Thanks so much. > > > > > > > > > > Reda > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > I don't see what the problem is - you set that registry key, add a > > > > > > new > > > > > > PST > > > > > > store using Namespace.AddStore, then call Namespace.RemoveStore.. The > > > > > > PST > > > > > > file should be released. Is that not the case? > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > > Thanks so much for quick response, but the problem is a locked file > > > > > > during the Outlook session. I can't completely to delete *.pst > > > > > > folder. > > > > > > I know that I have to use <Folder>.Delete() method, but I can't. > > > > > > I've > > > > > > heard about Extended MAPI, but I am not really familiar with C or > > > > > > C++, > > > > > > do you have any papers or articles or solutions examples for this > > > > > > problem. > > > > > > Thank you so much. > > > > > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > By default, PST provider keeps a PST file referenced and loaded > > > > > > > for > > > > > > > 30 > > > > > > > minutes. Or until the PST provider dll itself gets unloaded (e.g. > > > > > > > when > > > > > > > the > > > > > > > host process terminates). You might want to play with the registry > > > > > > > key > > > > > > > mentioned in http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > http://www.dimastr.com/> > > > > > > OutlookSpy - Outlook, CDO > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > > Hello, > > > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with my > > > > > > > > question, > > > > > > > > but > > > > > > > > after long searches, I couldn't find a solution to my problem. > > > > > > > > Problem: I am developing shared add - ins for MS Outlook 2003, > > > > > > > > my > > > > > > > > application will create *.pst file with calendar folder and that > > > > > > > > *.pst > > > > > > > > file > > > > > > > > will publish on server (Not Exchange server). But after i > > > > > > > > publish > > > > > > > > *.pst > > > > > > > > file > > > > > > > > on server user B, cannot view this file, because is locked. I > > > > > > > > used > > > > > > > > RemoveStore method to remove a folder, but it didn't solve my > > > > > > > > problem. > > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > > > Thank you so much > > > > > > > > Reda > > > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
I am not sure I understand what you mean. Where does calendarfolder come from? What is your code?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1182942776.357394.173230[ at ]k79g2000hse.googlegroups.com... I found it that I can't set folder list the way as I was added to Folder list. Right now the problem is to display Calendar folder, for example in Folder "Alex Calendars". My scenario is: I am adding programmically to folder list, let say Alex.pst file, then I do this.ActiveExplorer().Currentfolder = calendarfolder; this.ActiveExplorer().Display(); but Alex "Calendar" won't Display. Instead of this CurrentView set on "Inbox". But I adding Reda.pst file, everything works fine. I guess the problem is because Alex Calendars folder is not last on treeview.
Thanks for suggestions.
Reda
reda...[ at ]gmail.com raðë:
[Quoted Text] > Thanks, Dmitry, I have solved my problem by deleting particular > folder. But here is another problem came up: > I would like to add *pst file on the end of folder treeview like this: > +--Personal Folders > +---Hotmail > +--Alex Calendars > +--Reda Calendars > > I am getting this: > > +--Personal Folders > +--Alex Calendars > +---Hotmail > +--Reda Calendars > > It seems that Outlook sorts in alphabetical order, Is it a way to > change it? > > Thanks alot again, > Reda > > Dmitry Streblechenko rað : > > I meant "Why", not "What". > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > > I delete the whole PST file file first, then I do AddStore(). So my > > personal profile will renew. Am I doing something wrong. > > > > Thanks alot. > > > > Here is a piece of code: > > ... > > NameSpace outlookNS = > > applicationObject.GetNamespace("MAPI"); > > Explorer exp = applicationObject.ActiveExplorer(); > > MAPIFolder rootFolder = outlookNS.Folders[1]; > > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > > string path = PathP + outlookNS.CurrentUser.Name + ".pst"; > > if (System.IO.File.Exists(path)) > > { > > System.IO.File.Delete(path); > > } > > objFolder = null; > > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > > ".pst"); > > objFolder = outlookNS.Folders.GetLast(); > > objFolder.Name = outlookNS.CurrentUser.Name + " > > Calendars"; > > calendarFolder.CopyTo(objFolder); > > foreach (MAPIFolder folder in objFolder.Folders) > > { > > if (folder.Name == "Calendar") > > { > > folder.Name = outlookNS.CurrentUser.Name + ""; > > break; > > } > > } > > outlookNS.RemoveStore(objFolder); > > MessageBox.Show("Publish date: " + > > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + > > ".pst"),"Message"); > > outlookNS = null; > > objFolder = null; > > exp = null; > > > > .... > > > > Reda > > > > Dmitry Streblechenko ras : > > > What do you delete the whole PST file rather than its contents? > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > > Thank you all for suggestions. I set up manually a registry key for > > > Outlook 2003("11.0"), as it said in this article. > > > It seems that *.pst file is released, but another bug cames up > > > "Outlook failed to add personal store file to this session". I get > > > this error then call method AddStore again. > > > > > > My scenario is: I have app, where I have button "Publish calendar on > > > network", so when I click on this button, I check is <CurrentUser>.pst > > > exists. If exists, I delete that file, after that I call method > > > namespace.AddStore(path). > > > Here I got an error. Outlook failed to add personal store file to this > > > session". > > > > > > Any suggestions? > > > > > > Thank you again. > > > > > > Reda > > > > > > > > > Dmitry Streblechenko ras : > > > > What is your code? > > > > Did you create the right registry key? The article talks about > > > > Outlook > > > > 2000, > > > > that is what "9.0" in the key name refers to. In case of Outlook > > > > 2002, > > > > it > > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > > Try to display a message box immediatley after calling RemoveStore > > > > and > > > > before deleting the PST file to let the Windows message loop run. > > > > > > > > Just out of curiosity, why do you create a PST file if you want to > > > > delete > > > > it? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > > Yes, PST store folder has been removed, but a problem is *.pst file > > > > hasn't been released durring Outlook session. > > > > This is a problem. > > > > > > > > Thank you, > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > Do you see that PST store removed from Outlook when you call > > > > > RemoveStore? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > > Well, maybe a problem is with releasing a *.pst file. I set up > > > > > that > > > > > registry key, I added new PST store using Namespace.AddStore, then > > > > > call Namespace.RemoveStore. but PST file didn't released during > > > > > Outlook Session. > > > > > Also, I would like to mention that *.PST files store on Network > > > > > folder. > > > > > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > > > session is running? > > > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > > > Thanks so much. > > > > > > > > > > Reda > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > I don't see what the problem is - you set that registry key, add > > > > > > a > > > > > > new > > > > > > PST > > > > > > store using Namespace.AddStore, then call Namespace.RemoveStore. > > > > > > The > > > > > > PST > > > > > > file should be released. Is that not the case? > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > > Thanks so much for quick response, but the problem is a locked > > > > > > file > > > > > > during the Outlook session. I can't completely to delete *.pst > > > > > > folder. > > > > > > I know that I have to use <Folder>.Delete() method, but I can't. > > > > > > I've > > > > > > heard about Extended MAPI, but I am not really familiar with C > > > > > > or > > > > > > C++, > > > > > > do you have any papers or articles or solutions examples for > > > > > > this > > > > > > problem. > > > > > > Thank you so much. > > > > > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > By default, PST provider keeps a PST file referenced and > > > > > > > loaded > > > > > > > for > > > > > > > 30 > > > > > > > minutes. Or until the PST provider dll itself gets unloaded > > > > > > > (e.g. > > > > > > > when > > > > > > > the > > > > > > > host process terminates). You might want to play with the > > > > > > > registry > > > > > > > key > > > > > > > mentioned in > > > > > > > http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > http://www.dimastr.com/> > > > > > > OutlookSpy - Outlook, CDO > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > > Hello, > > > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with > > > > > > > > my > > > > > > > > question, > > > > > > > > but > > > > > > > > after long searches, I couldn't find a solution to my > > > > > > > > problem. > > > > > > > > Problem: I am developing shared add - ins for MS Outlook > > > > > > > > 2003, > > > > > > > > my > > > > > > > > application will create *.pst file with calendar folder and > > > > > > > > that > > > > > > > > *.pst > > > > > > > > file > > > > > > > > will publish on server (Not Exchange server). But after i > > > > > > > > publish > > > > > > > > *.pst > > > > > > > > file > > > > > > > > on server user B, cannot view this file, because is locked. > > > > > > > > I > > > > > > > > used > > > > > > > > RemoveStore method to remove a folder, but it didn't solve > > > > > > > > my > > > > > > > > problem. > > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > > > Thank you so much > > > > > > > > Reda > > > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Here is a code:
private void IkeltiUserKalendoriu(PathUP) { MAPIFolder objFolder; if (CmbUser.Text.Length > 0) { objFolder = SetStore(PathUP, CmbUser.Text + " Calendars"); foreach(MAPIFolder folder in objFolder.Folders) { if (folder.Name == CmbUser.Text) { applicationObject.ActiveExplorer().CurrentFolder = folder; applicationObject.ActiveExplorer().Display(); } } } else { MessageBox.Show("Error: Choice a user" , "Message"); }
objFolder = null; }
Thanks again for suggestions.
Reda
Dmitry Streblechenko raðë:
[Quoted Text] > I am not sure I understand what you mean. > Where does calendarfolder come from? What is your code? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182942776.357394.173230[ at ]k79g2000hse.googlegroups.com... > I found it that I can't set folder list the way as I was added to > Folder list. > Right now the problem is to display Calendar folder, for example in > Folder "Alex Calendars". My scenario is: > I am adding programmically to folder list, let say Alex.pst file, then > I do this.ActiveExplorer().Currentfolder = calendarfolder; > this.ActiveExplorer().Display(); but Alex "Calendar" won't Display. > Instead of this CurrentView set on "Inbox". > But I adding Reda.pst file, everything works fine. > I guess the problem is because Alex Calendars folder is not last on > treeview. > > Thanks for suggestions. > > Reda > > reda...[ at ]gmail.com ra : > > Thanks, Dmitry, I have solved my problem by deleting particular > > folder. But here is another problem came up: > > I would like to add *pst file on the end of folder treeview like this: > > +--Personal Folders > > +---Hotmail > > +--Alex Calendars > > +--Reda Calendars > > > > I am getting this: > > > > +--Personal Folders > > +--Alex Calendars > > +---Hotmail > > +--Reda Calendars > > > > It seems that Outlook sorts in alphabetical order, Is it a way to > > change it? > > > > Thanks alot again, > > Reda > > > > Dmitry Streblechenko ra : > > > I meant "Why", not "What". > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > > > I delete the whole PST file file first, then I do AddStore(). So my > > > personal profile will renew. Am I doing something wrong. > > > > > > Thanks alot. > > > > > > Here is a piece of code: > > > ... > > > NameSpace outlookNS = > > > applicationObject.GetNamespace("MAPI"); > > > Explorer exp = applicationObject.ActiveExplorer(); > > > MAPIFolder rootFolder = outlookNS.Folders[1]; > > > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > > > string path = PathP + outlookNS.CurrentUser.Name + ".pst"; > > > if (System.IO.File.Exists(path)) > > > { > > > System.IO.File.Delete(path); > > > } > > > objFolder = null; > > > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > > > ".pst"); > > > objFolder = outlookNS.Folders.GetLast(); > > > objFolder.Name = outlookNS.CurrentUser.Name + " > > > Calendars"; > > > calendarFolder.CopyTo(objFolder); > > > foreach (MAPIFolder folder in objFolder.Folders) > > > { > > > if (folder.Name == "Calendar") > > > { > > > folder.Name = outlookNS.CurrentUser.Name + ""; > > > break; > > > } > > > } > > > outlookNS.RemoveStore(objFolder); > > > MessageBox.Show("Publish date: " + > > > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + > > > ".pst"),"Message"); > > > outlookNS = null; > > > objFolder = null; > > > exp = null; > > > > > > .... > > > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > > What do you delete the whole PST file rather than its contents? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > > > Thank you all for suggestions. I set up manually a registry key for > > > > Outlook 2003("11.0"), as it said in this article. > > > > It seems that *.pst file is released, but another bug cames up > > > > "Outlook failed to add personal store file to this session". I get > > > > this error then call method AddStore again. > > > > > > > > My scenario is: I have app, where I have button "Publish calendar on > > > > network", so when I click on this button, I check is <CurrentUser>.pst > > > > exists. If exists, I delete that file, after that I call method > > > > namespace.AddStore(path). > > > > Here I got an error. Outlook failed to add personal store file to this > > > > session". > > > > > > > > Any suggestions? > > > > > > > > Thank you again. > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > What is your code? > > > > > Did you create the right registry key? The article talks about > > > > > Outlook > > > > > 2000, > > > > > that is what "9.0" in the key name refers to. In case of Outlook > > > > > 2002, > > > > > it > > > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > > > Try to display a message box immediatley after calling RemoveStore > > > > > and > > > > > before deleting the PST file to let the Windows message loop run. > > > > > > > > > > Just out of curiosity, why do you create a PST file if you want to > > > > > delete > > > > > it? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > > > Yes, PST store folder has been removed, but a problem is *.pst file > > > > > hasn't been released durring Outlook session. > > > > > This is a problem. > > > > > > > > > > Thank you, > > > > > > > > > > Reda > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > Do you see that PST store removed from Outlook when you call > > > > > > RemoveStore? > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > > > Well, maybe a problem is with releasing a *.pst file. I set up > > > > > > that > > > > > > registry key, I added new PST store using Namespace.AddStore, then > > > > > > call Namespace.RemoveStore. but PST file didn't released during > > > > > > Outlook Session. > > > > > > Also, I would like to mention that *.PST files store on Network > > > > > > folder. > > > > > > > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > > > > session is running? > > > > > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > > > > > Thanks so much. > > > > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > I don't see what the problem is - you set that registry key, add > > > > > > > a > > > > > > > new > > > > > > > PST > > > > > > > store using Namespace.AddStore, then call Namespace.RemoveStore. > > > > > > > The > > > > > > > PST > > > > > > > file should be released. Is that not the case? > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > http://www.dimastr.com/> > > > > > > OutlookSpy - Outlook, CDO > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > > > Thanks so much for quick response, but the problem is a locked > > > > > > > file > > > > > > > during the Outlook session. I can't completely to delete *.pst > > > > > > > folder. > > > > > > > I know that I have to use <Folder>.Delete() method, but I can't. > > > > > > > I've > > > > > > > heard about Extended MAPI, but I am not really familiar with C > > > > > > > or > > > > > > > C++, > > > > > > > do you have any papers or articles or solutions examples for > > > > > > > this > > > > > > > problem. > > > > > > > Thank you so much. > > > > > > > > > > > > > > Reda > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > > By default, PST provider keeps a PST file referenced and > > > > > > > > loaded > > > > > > > > for > > > > > > > > 30 > > > > > > > > minutes. Or until the PST provider dll itself gets unloaded > > > > > > > > (e.g. > > > > > > > > when > > > > > > > > the > > > > > > > > host process terminates). You might want to play with the > > > > > > > > registry > > > > > > > > key > > > > > > > > mentioned in > > > > > > > > http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > > http://www.dimastr.com/> > > > > > > > OutlookSpy - Outlook, CDO > > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat with > > > > > > > > > my > > > > > > > > > question, > > > > > > > > > but > > > > > > > > > after long searches, I couldn't find a solution to my > > > > > > > > > problem. > > > > > > > > > Problem: I am developing shared add - ins for MS Outlook > > > > > > > > > 2003, > > > > > > > > > my > > > > > > > > > application will create *.pst file with calendar folder and > > > > > > > > > that > > > > > > > > > *.pst > > > > > > > > > file > > > > > > > > > will publish on server (Not Exchange server). But after i > > > > > > > > > publish > > > > > > > > > *.pst > > > > > > > > > file > > > > > > > > > on server user B, cannot view this file, because is locked. > > > > > > > > > I > > > > > > > > > used > > > > > > > > > RemoveStore method to remove a folder, but it didn't solve > > > > > > > > > my > > > > > > > > > problem. > > > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > > > > > Thank you so much > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
What happens if you call folder.Display() instead?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1183007552.899768.195790[ at ]q69g2000hsb.googlegroups.com...
Here is a code:
private void IkeltiUserKalendoriu(PathUP) { MAPIFolder objFolder; if (CmbUser.Text.Length > 0) { objFolder = SetStore(PathUP, CmbUser.Text + " Calendars"); foreach(MAPIFolder folder in objFolder.Folders) { if (folder.Name == CmbUser.Text) { applicationObject.ActiveExplorer().CurrentFolder = folder; applicationObject.ActiveExplorer().Display(); } } } else { MessageBox.Show("Error: Choice a user" , "Message"); }
objFolder = null; }
Thanks again for suggestions.
Reda
Dmitry Streblechenko raðë:
[Quoted Text] > I am not sure I understand what you mean. > Where does calendarfolder come from? What is your code? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1182942776.357394.173230[ at ]k79g2000hse.googlegroups.com... > I found it that I can't set folder list the way as I was added to > Folder list. > Right now the problem is to display Calendar folder, for example in > Folder "Alex Calendars". My scenario is: > I am adding programmically to folder list, let say Alex.pst file, then > I do this.ActiveExplorer().Currentfolder = calendarfolder; > this.ActiveExplorer().Display(); but Alex "Calendar" won't Display. > Instead of this CurrentView set on "Inbox". > But I adding Reda.pst file, everything works fine. > I guess the problem is because Alex Calendars folder is not last on > treeview. > > Thanks for suggestions. > > Reda > > reda...[ at ]gmail.com ra : > > Thanks, Dmitry, I have solved my problem by deleting particular > > folder. But here is another problem came up: > > I would like to add *pst file on the end of folder treeview like this: > > +--Personal Folders > > +---Hotmail > > +--Alex Calendars > > +--Reda Calendars > > > > I am getting this: > > > > +--Personal Folders > > +--Alex Calendars > > +---Hotmail > > +--Reda Calendars > > > > It seems that Outlook sorts in alphabetical order, Is it a way to > > change it? > > > > Thanks alot again, > > Reda > > > > Dmitry Streblechenko ra : > > > I meant "Why", not "What". > > > > > > Dmitry Streblechenko (MVP) > > > http://www.dimastr.com/> > > OutlookSpy - Outlook, CDO > > > and MAPI Developer Tool > > > > > > <reda246[ at ]gmail.com> wrote in message > > > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > > > I delete the whole PST file file first, then I do AddStore(). So my > > > personal profile will renew. Am I doing something wrong. > > > > > > Thanks alot. > > > > > > Here is a piece of code: > > > ... > > > NameSpace outlookNS = > > > applicationObject.GetNamespace("MAPI"); > > > Explorer exp = applicationObject.ActiveExplorer(); > > > MAPIFolder rootFolder = outlookNS.Folders[1]; > > > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > > > string path = PathP + outlookNS.CurrentUser.Name + ".pst"; > > > if (System.IO.File.Exists(path)) > > > { > > > System.IO.File.Delete(path); > > > } > > > objFolder = null; > > > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > > > ".pst"); > > > objFolder = outlookNS.Folders.GetLast(); > > > objFolder.Name = outlookNS.CurrentUser.Name + " > > > Calendars"; > > > calendarFolder.CopyTo(objFolder); > > > foreach (MAPIFolder folder in objFolder.Folders) > > > { > > > if (folder.Name == "Calendar") > > > { > > > folder.Name = outlookNS.CurrentUser.Name + ""; > > > break; > > > } > > > } > > > outlookNS.RemoveStore(objFolder); > > > MessageBox.Show("Publish date: " + > > > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + > > > ".pst"),"Message"); > > > outlookNS = null; > > > objFolder = null; > > > exp = null; > > > > > > .... > > > > > > Reda > > > > > > Dmitry Streblechenko ras : > > > > What do you delete the whole PST file rather than its contents? > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > > > Thank you all for suggestions. I set up manually a registry key for > > > > Outlook 2003("11.0"), as it said in this article. > > > > It seems that *.pst file is released, but another bug cames up > > > > "Outlook failed to add personal store file to this session". I get > > > > this error then call method AddStore again. > > > > > > > > My scenario is: I have app, where I have button "Publish calendar on > > > > network", so when I click on this button, I check is > > > > <CurrentUser>.pst > > > > exists. If exists, I delete that file, after that I call method > > > > namespace.AddStore(path). > > > > Here I got an error. Outlook failed to add personal store file to > > > > this > > > > session". > > > > > > > > Any suggestions? > > > > > > > > Thank you again. > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > What is your code? > > > > > Did you create the right registry key? The article talks about > > > > > Outlook > > > > > 2000, > > > > > that is what "9.0" in the key name refers to. In case of Outlook > > > > > 2002, > > > > > it > > > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > > > Try to display a message box immediatley after calling RemoveStore > > > > > and > > > > > before deleting the PST file to let the Windows message loop run. > > > > > > > > > > Just out of curiosity, why do you create a PST file if you want to > > > > > delete > > > > > it? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > > > Yes, PST store folder has been removed, but a problem is *.pst > > > > > file > > > > > hasn't been released durring Outlook session. > > > > > This is a problem. > > > > > > > > > > Thank you, > > > > > > > > > > Reda > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > Do you see that PST store removed from Outlook when you call > > > > > > RemoveStore? > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > > > Well, maybe a problem is with releasing a *.pst file. I set up > > > > > > that > > > > > > registry key, I added new PST store using Namespace.AddStore, > > > > > > then > > > > > > call Namespace.RemoveStore. but PST file didn't released during > > > > > > Outlook Session. > > > > > > Also, I would like to mention that *.PST files store on Network > > > > > > folder. > > > > > > > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > > > > session is running? > > > > > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > > > > > Thanks so much. > > > > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > I don't see what the problem is - you set that registry key, > > > > > > > add > > > > > > > a > > > > > > > new > > > > > > > PST > > > > > > > store using Namespace.AddStore, then call > > > > > > > Namespace.RemoveStore. > > > > > > > The > > > > > > > PST > > > > > > > file should be released. Is that not the case? > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > http://www.dimastr.com/> > > > > > > OutlookSpy - Outlook, CDO > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > > > Thanks so much for quick response, but the problem is a locked > > > > > > > file > > > > > > > during the Outlook session. I can't completely to delete *.pst > > > > > > > folder. > > > > > > > I know that I have to use <Folder>.Delete() method, but I > > > > > > > can't. > > > > > > > I've > > > > > > > heard about Extended MAPI, but I am not really familiar with C > > > > > > > or > > > > > > > C++, > > > > > > > do you have any papers or articles or solutions examples for > > > > > > > this > > > > > > > problem. > > > > > > > Thank you so much. > > > > > > > > > > > > > > Reda > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > > By default, PST provider keeps a PST file referenced and > > > > > > > > loaded > > > > > > > > for > > > > > > > > 30 > > > > > > > > minutes. Or until the PST provider dll itself gets unloaded > > > > > > > > (e.g. > > > > > > > > when > > > > > > > > the > > > > > > > > host process terminates). You might want to play with the > > > > > > > > registry > > > > > > > > key > > > > > > > > mentioned in > > > > > > > > http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > > http://www.dimastr.com/> > > > > > > > OutlookSpy - Outlook, CDO > > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat > > > > > > > > > with > > > > > > > > > my > > > > > > > > > question, > > > > > > > > > but > > > > > > > > > after long searches, I couldn't find a solution to my > > > > > > > > > problem. > > > > > > > > > Problem: I am developing shared add - ins for MS Outlook > > > > > > > > > 2003, > > > > > > > > > my > > > > > > > > > application will create *.pst file with calendar folder > > > > > > > > > and > > > > > > > > > that > > > > > > > > > *.pst > > > > > > > > > file > > > > > > > > > will publish on server (Not Exchange server). But after i > > > > > > > > > publish > > > > > > > > > *.pst > > > > > > > > > file > > > > > > > > > on server user B, cannot view this file, because is > > > > > > > > > locked. > > > > > > > > > I > > > > > > > > > used > > > > > > > > > RemoveStore method to remove a folder, but it didn't solve > > > > > > > > > my > > > > > > > > > problem. > > > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > > > > > Thank you so much > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
It always displays "Inbox" folder.
Ok, I have add FolderSwitch() event on OnStartupComplete(ref System.Array custom), displays User Calendar, but CurrentFolder is "Inbox" folder.
Here is a code for FolderSwitch() event:
void explorer_FolderSwitch() { NameSpace outlookNS = applicationObject.GetNamespace("MAPI"); MAPIFolder objFolder; explorer = this.applicationObject.ActiveExplorer(); objFolder = outlookNS.Folders[CmbUser.Text + " Calendars"]; foreach (MAPIFolder folder in objFolder.Folders) { if (folder.Name == CmbUser.Text) { explorer.CurrentFolder = objFolder.Folders[CmbUser.Text]; explorer.Display(); } } }
Maybe I am doing something wrong? Thanks
Reda Dmitry Streblechenko raðë:
[Quoted Text] > What happens if you call folder.Display() instead? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1183007552.899768.195790[ at ]q69g2000hsb.googlegroups.com... > > Here is a code: > > private void IkeltiUserKalendoriu(PathUP) > { > MAPIFolder objFolder; > if (CmbUser.Text.Length > 0) > { > objFolder = SetStore(PathUP, CmbUser.Text + " Calendars"); > foreach(MAPIFolder folder in objFolder.Folders) > { > if (folder.Name == CmbUser.Text) > { > applicationObject.ActiveExplorer().CurrentFolder = > folder; > applicationObject.ActiveExplorer().Display(); > } > } > } > else > { MessageBox.Show("Error: Choice a user" , "Message"); } > > objFolder = null; > } > > Thanks again for suggestions. > > Reda > > Dmitry Streblechenko ra : > > I am not sure I understand what you mean. > > Where does calendarfolder come from? What is your code? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182942776.357394.173230[ at ]k79g2000hse.googlegroups.com... > > I found it that I can't set folder list the way as I was added to > > Folder list. > > Right now the problem is to display Calendar folder, for example in > > Folder "Alex Calendars". My scenario is: > > I am adding programmically to folder list, let say Alex.pst file, then > > I do this.ActiveExplorer().Currentfolder = calendarfolder; > > this.ActiveExplorer().Display(); but Alex "Calendar" won't Display. > > Instead of this CurrentView set on "Inbox". > > But I adding Reda.pst file, everything works fine. > > I guess the problem is because Alex Calendars folder is not last on > > treeview. > > > > Thanks for suggestions. > > > > Reda > > > > reda...[ at ]gmail.com ra : > > > Thanks, Dmitry, I have solved my problem by deleting particular > > > folder. But here is another problem came up: > > > I would like to add *pst file on the end of folder treeview like this: > > > +--Personal Folders > > > +---Hotmail > > > +--Alex Calendars > > > +--Reda Calendars > > > > > > I am getting this: > > > > > > +--Personal Folders > > > +--Alex Calendars > > > +---Hotmail > > > +--Reda Calendars > > > > > > It seems that Outlook sorts in alphabetical order, Is it a way to > > > change it? > > > > > > Thanks alot again, > > > Reda > > > > > > Dmitry Streblechenko ra : > > > > I meant "Why", not "What". > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > > > > I delete the whole PST file file first, then I do AddStore(). So my > > > > personal profile will renew. Am I doing something wrong. > > > > > > > > Thanks alot. > > > > > > > > Here is a piece of code: > > > > ... > > > > NameSpace outlookNS = > > > > applicationObject.GetNamespace("MAPI"); > > > > Explorer exp = applicationObject.ActiveExplorer(); > > > > MAPIFolder rootFolder = outlookNS.Folders[1]; > > > > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > > > > string path = PathP + outlookNS.CurrentUser.Name + ".pst"; > > > > if (System.IO.File.Exists(path)) > > > > { > > > > System.IO.File.Delete(path); > > > > } > > > > objFolder = null; > > > > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > > > > ".pst"); > > > > objFolder = outlookNS.Folders.GetLast(); > > > > objFolder.Name = outlookNS.CurrentUser.Name + " > > > > Calendars"; > > > > calendarFolder.CopyTo(objFolder); > > > > foreach (MAPIFolder folder in objFolder.Folders) > > > > { > > > > if (folder.Name == "Calendar") > > > > { > > > > folder.Name = outlookNS.CurrentUser.Name + ""; > > > > break; > > > > } > > > > } > > > > outlookNS.RemoveStore(objFolder); > > > > MessageBox.Show("Publish date: " + > > > > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name + > > > > ".pst"),"Message"); > > > > outlookNS = null; > > > > objFolder = null; > > > > exp = null; > > > > > > > > .... > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > What do you delete the whole PST file rather than its contents? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > > > > Thank you all for suggestions. I set up manually a registry key for > > > > > Outlook 2003("11.0"), as it said in this article. > > > > > It seems that *.pst file is released, but another bug cames up > > > > > "Outlook failed to add personal store file to this session". I get > > > > > this error then call method AddStore again. > > > > > > > > > > My scenario is: I have app, where I have button "Publish calendar on > > > > > network", so when I click on this button, I check is > > > > > <CurrentUser>.pst > > > > > exists. If exists, I delete that file, after that I call method > > > > > namespace.AddStore(path). > > > > > Here I got an error. Outlook failed to add personal store file to > > > > > this > > > > > session". > > > > > > > > > > Any suggestions? > > > > > > > > > > Thank you again. > > > > > > > > > > Reda > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > What is your code? > > > > > > Did you create the right registry key? The article talks about > > > > > > Outlook > > > > > > 2000, > > > > > > that is what "9.0" in the key name refers to. In case of Outlook > > > > > > 2002, > > > > > > it > > > > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > > > > Try to display a message box immediatley after calling RemoveStore > > > > > > and > > > > > > before deleting the PST file to let the Windows message loop run. > > > > > > > > > > > > Just out of curiosity, why do you create a PST file if you want to > > > > > > delete > > > > > > it? > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > > > > Yes, PST store folder has been removed, but a problem is *.pst > > > > > > file > > > > > > hasn't been released durring Outlook session. > > > > > > This is a problem. > > > > > > > > > > > > Thank you, > > > > > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > Do you see that PST store removed from Outlook when you call > > > > > > > RemoveStore? > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > http://www.dimastr.com/> > > > > > > OutlookSpy - Outlook, CDO > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > > > > Well, maybe a problem is with releasing a *.pst file. I set up > > > > > > > that > > > > > > > registry key, I added new PST store using Namespace.AddStore, > > > > > > > then > > > > > > > call Namespace.RemoveStore. but PST file didn't released during > > > > > > > Outlook Session. > > > > > > > Also, I would like to mention that *.PST files store on Network > > > > > > > folder. > > > > > > > > > > > > > > Sorry for my dummy question, maybe that problem is that Outlook > > > > > > > session is running? > > > > > > > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > > > > > > > Thanks so much. > > > > > > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > > I don't see what the problem is - you set that registry key, > > > > > > > > add > > > > > > > > a > > > > > > > > new > > > > > > > > PST > > > > > > > > store using Namespace.AddStore, then call > > > > > > > > Namespace.RemoveStore. > > > > > > > > The > > > > > > > > PST > > > > > > > > file should be released. Is that not the case? > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > > http://www.dimastr.com/> > > > > > > > OutlookSpy - Outlook, CDO > > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > > > > Thanks so much for quick response, but the problem is a locked > > > > > > > > file > > > > > > > > during the Outlook session. I can't completely to delete *.pst > > > > > > > > folder. > > > > > > > > I know that I have to use <Folder>.Delete() method, but I > > > > > > > > can't. > > > > > > > > I've > > > > > > > > heard about Extended MAPI, but I am not really familiar with C > > > > > > > > or > > > > > > > > C++, > > > > > > > > do you have any papers or articles or solutions examples for > > > > > > > > this > > > > > > > > problem. > > > > > > > > Thank you so much. > > > > > > > > > > > > > > > > Reda > > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > > > By default, PST provider keeps a PST file referenced and > > > > > > > > > loaded > > > > > > > > > for > > > > > > > > > 30 > > > > > > > > > minutes. Or until the PST provider dll itself gets unloaded > > > > > > > > > (e.g. > > > > > > > > > when > > > > > > > > > the > > > > > > > > > host process terminates). You might want to play with the > > > > > > > > > registry > > > > > > > > > key > > > > > > > > > mentioned in > > > > > > > > > http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > > > http://www.dimastr.com/> > > > > > > > > OutlookSpy - Outlook, CDO > > > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in message > > > > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat > > > > > > > > > > with > > > > > > > > > > my > > > > > > > > > > question, > > > > > > > > > > but > > > > > > > > > > after long searches, I couldn't find a solution to my > > > > > > > > > > problem. > > > > > > > > > > Problem: I am developing shared add - ins for MS Outlook > > > > > > > > > > 2003, > > > > > > > > > > my > > > > > > > > > > application will create *.pst file with calendar folder > > > > > > > > > > and > > > > > > > > > > that > > > > > > > > > > *.pst > > > > > > > > > > file > > > > > > > > > > will publish on server (Not Exchange server). But after i > > > > > > > > > > publish > > > > > > > > > > *.pst > > > > > > > > > > file > > > > > > > > > > on server user B, cannot view this file, because is > > > > > > > > > > locked. > > > > > > > > > > I > > > > > > > > > > used > > > > > > > > > > RemoveStore method to remove a folder, but it didn't solve > > > > > > > > > > my > > > > > > > > > > problem. > > > > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > > > > > > > Thank you so much > > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
Ok, but when does it work?. You wrote "Alex.pst does not work", but "But I adding Reda.pst file, everything works fine" What exactly is the difference between these two scenarios?
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool
<reda246[ at ]gmail.com> wrote in message news:1183034653.776093.225670[ at ]w5g2000hsg.googlegroups.com... It always displays "Inbox" folder.
Ok, I have add FolderSwitch() event on OnStartupComplete(ref System.Array custom), displays User Calendar, but CurrentFolder is "Inbox" folder.
Here is a code for FolderSwitch() event:
void explorer_FolderSwitch() { NameSpace outlookNS = applicationObject.GetNamespace("MAPI"); MAPIFolder objFolder; explorer = this.applicationObject.ActiveExplorer(); objFolder = outlookNS.Folders[CmbUser.Text + " Calendars"]; foreach (MAPIFolder folder in objFolder.Folders) { if (folder.Name == CmbUser.Text) { explorer.CurrentFolder = objFolder.Folders[CmbUser.Text]; explorer.Display(); } } }
Maybe I am doing something wrong? Thanks
Reda Dmitry Streblechenko raðë:
[Quoted Text] > What happens if you call folder.Display() instead? > > Dmitry Streblechenko (MVP) > http://www.dimastr.com/> OutlookSpy - Outlook, CDO > and MAPI Developer Tool > > <reda246[ at ]gmail.com> wrote in message > news:1183007552.899768.195790[ at ]q69g2000hsb.googlegroups.com... > > Here is a code: > > private void IkeltiUserKalendoriu(PathUP) > { > MAPIFolder objFolder; > if (CmbUser.Text.Length > 0) > { > objFolder = SetStore(PathUP, CmbUser.Text + " Calendars"); > foreach(MAPIFolder folder in objFolder.Folders) > { > if (folder.Name == CmbUser.Text) > { > applicationObject.ActiveExplorer().CurrentFolder = > folder; > applicationObject.ActiveExplorer().Display(); > } > } > } > else > { MessageBox.Show("Error: Choice a user" , "Message"); } > > objFolder = null; > } > > Thanks again for suggestions. > > Reda > > Dmitry Streblechenko ra : > > I am not sure I understand what you mean. > > Where does calendarfolder come from? What is your code? > > > > Dmitry Streblechenko (MVP) > > http://www.dimastr.com/> > OutlookSpy - Outlook, CDO > > and MAPI Developer Tool > > > > <reda246[ at ]gmail.com> wrote in message > > news:1182942776.357394.173230[ at ]k79g2000hse.googlegroups.com... > > I found it that I can't set folder list the way as I was added to > > Folder list. > > Right now the problem is to display Calendar folder, for example in > > Folder "Alex Calendars". My scenario is: > > I am adding programmically to folder list, let say Alex.pst file, then > > I do this.ActiveExplorer().Currentfolder = calendarfolder; > > this.ActiveExplorer().Display(); but Alex "Calendar" won't Display. > > Instead of this CurrentView set on "Inbox". > > But I adding Reda.pst file, everything works fine. > > I guess the problem is because Alex Calendars folder is not last on > > treeview. > > > > Thanks for suggestions. > > > > Reda > > > > reda...[ at ]gmail.com ra : > > > Thanks, Dmitry, I have solved my problem by deleting particular > > > folder. But here is another problem came up: > > > I would like to add *pst file on the end of folder treeview like this: > > > +--Personal Folders > > > +---Hotmail > > > +--Alex Calendars > > > +--Reda Calendars > > > > > > I am getting this: > > > > > > +--Personal Folders > > > +--Alex Calendars > > > +---Hotmail > > > +--Reda Calendars > > > > > > It seems that Outlook sorts in alphabetical order, Is it a way to > > > change it? > > > > > > Thanks alot again, > > > Reda > > > > > > Dmitry Streblechenko ra : > > > > I meant "Why", not "What". > > > > > > > > Dmitry Streblechenko (MVP) > > > > http://www.dimastr.com/> > > > OutlookSpy - Outlook, CDO > > > > and MAPI Developer Tool > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > news:1182834622.002524.173670[ at ]g4g2000hsf.googlegroups.com... > > > > I delete the whole PST file file first, then I do AddStore(). So my > > > > personal profile will renew. Am I doing something wrong. > > > > > > > > Thanks alot. > > > > > > > > Here is a piece of code: > > > > ... > > > > NameSpace outlookNS = > > > > applicationObject.GetNamespace("MAPI"); > > > > Explorer exp = applicationObject.ActiveExplorer(); > > > > MAPIFolder rootFolder = outlookNS.Folders[1]; > > > > MAPIFolder objFolder = outlookNS.Folders.GetLast(); > > > > string path = PathP + outlookNS.CurrentUser.Name + > > > > ".pst"; > > > > if (System.IO.File.Exists(path)) > > > > { > > > > System.IO.File.Delete(path); > > > > } > > > > objFolder = null; > > > > outlookNS.AddStore(PathP + outlookNS.CurrentUser.Name + > > > > ".pst"); > > > > objFolder = outlookNS.Folders.GetLast(); > > > > objFolder.Name = outlookNS.CurrentUser.Name + " > > > > Calendars"; > > > > calendarFolder.CopyTo(objFolder); > > > > foreach (MAPIFolder folder in objFolder.Folders) > > > > { > > > > if (folder.Name == "Calendar") > > > > { > > > > folder.Name = outlookNS.CurrentUser.Name + ""; > > > > break; > > > > } > > > > } > > > > outlookNS.RemoveStore(objFolder); > > > > MessageBox.Show("Publish date: " + > > > > System.IO.File.GetLastWriteTime(PathP + outlookNS.CurrentUser.Name > > > > + > > > > ".pst"),"Message"); > > > > outlookNS = null; > > > > objFolder = null; > > > > exp = null; > > > > > > > > .... > > > > > > > > Reda > > > > > > > > Dmitry Streblechenko ras : > > > > > What do you delete the whole PST file rather than its contents? > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > http://www.dimastr.com/> > > > > OutlookSpy - Outlook, CDO > > > > > and MAPI Developer Tool > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > news:1182511295.864671.55670[ at ]o61g2000hsh.googlegroups.com... > > > > > Thank you all for suggestions. I set up manually a registry key > > > > > for > > > > > Outlook 2003("11.0"), as it said in this article. > > > > > It seems that *.pst file is released, but another bug cames up > > > > > "Outlook failed to add personal store file to this session". I get > > > > > this error then call method AddStore again. > > > > > > > > > > My scenario is: I have app, where I have button "Publish calendar > > > > > on > > > > > network", so when I click on this button, I check is > > > > > <CurrentUser>.pst > > > > > exists. If exists, I delete that file, after that I call method > > > > > namespace.AddStore(path). > > > > > Here I got an error. Outlook failed to add personal store file to > > > > > this > > > > > session". > > > > > > > > > > Any suggestions? > > > > > > > > > > Thank you again. > > > > > > > > > > Reda > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > What is your code? > > > > > > Did you create the right registry key? The article talks about > > > > > > Outlook > > > > > > 2000, > > > > > > that is what "9.0" in the key name refers to. In case of Outlook > > > > > > 2002, > > > > > > it > > > > > > should be "10.0", Outlook 2003 - "11.0", etc. > > > > > > Try to display a message box immediatley after calling > > > > > > RemoveStore > > > > > > and > > > > > > before deleting the PST file to let the Windows message loop > > > > > > run. > > > > > > > > > > > > Just out of curiosity, why do you create a PST file if you want > > > > > > to > > > > > > delete > > > > > > it? > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > http://www.dimastr.com/> > > > > > OutlookSpy - Outlook, CDO > > > > > > and MAPI Developer Tool > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > news:1182314706.050725.230080[ at ]p77g2000hsh.googlegroups.com... > > > > > > Yes, PST store folder has been removed, but a problem is *.pst > > > > > > file > > > > > > hasn't been released durring Outlook session. > > > > > > This is a problem. > > > > > > > > > > > > Thank you, > > > > > > > > > > > > Reda > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > Do you see that PST store removed from Outlook when you call > > > > > > > RemoveStore? > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > http://www.dimastr.com/> > > > > > > OutlookSpy - Outlook, CDO > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > > news:1182264292.300694.76720[ at ]m36g2000hse.googlegroups.com... > > > > > > > Well, maybe a problem is with releasing a *.pst file. I set up > > > > > > > that > > > > > > > registry key, I added new PST store using Namespace.AddStore, > > > > > > > then > > > > > > > call Namespace.RemoveStore. but PST file didn't released > > > > > > > during > > > > > > > Outlook Session. > > > > > > > Also, I would like to mention that *.PST files store on > > > > > > > Network > > > > > > > folder. > > > > > > > > > > > > > > Sorry for my dummy question, maybe that problem is that > > > > > > > Outlook > > > > > > > session is running? > > > > > > > > > > > > > > How to solve this problem without exiting Outlook? > > > > > > > > > > > > > > Thanks so much. > > > > > > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > > I don't see what the problem is - you set that registry key, > > > > > > > > add > > > > > > > > a > > > > > > > > new > > > > > > > > PST > > > > > > > > store using Namespace.AddStore, then call > > > > > > > > Namespace.RemoveStore. > > > > > > > > The > > > > > > > > PST > > > > > > > > file should be released. Is that not the case? > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > > http://www.dimastr.com/> > > > > > > > OutlookSpy - Outlook, CDO > > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > > > <reda246[ at ]gmail.com> wrote in message > > > > > > > > news:1182144726.367967.320090[ at ]u2g2000hsc.googlegroups.com... > > > > > > > > Thanks so much for quick response, but the problem is a > > > > > > > > locked > > > > > > > > file > > > > > > > > during the Outlook session. I can't completely to delete > > > > > > > > *.pst > > > > > > > > folder. > > > > > > > > I know that I have to use <Folder>.Delete() method, but I > > > > > > > > can't. > > > > > > > > I've > > > > > > > > heard about Extended MAPI, but I am not really familiar with > > > > > > > > C > > > > > > > > or > > > > > > > > C++, > > > > > > > > do you have any papers or articles or solutions examples for > > > > > > > > this > > > > > > > > problem. > > > > > > > > Thank you so much. > > > > > > > > > > > > > > > > Reda > > > > > > > > > > > > > > > > Dmitry Streblechenko ras : > > > > > > > > > By default, PST provider keeps a PST file referenced and > > > > > > > > > loaded > > > > > > > > > for > > > > > > > > > 30 > > > > > > > > > minutes. Or until the PST provider dll itself gets > > > > > > > > > unloaded > > > > > > > > > (e.g. > > > > > > > > > when > > > > > > > > > the > > > > > > > > > host process terminates). You might want to play with the > > > > > > > > > registry > > > > > > > > > key > > > > > > > > > mentioned in > > > > > > > > > http://support.microsoft.com/Default.aspx?kbid=222328> > > > > > > > > > > > > > > > > > > > > > > > > > > Dmitry Streblechenko (MVP) > > > > > > > > > http://www.dimastr.com/> > > > > > > > > OutlookSpy - Outlook, CDO > > > > > > > > > and MAPI Developer Tool > > > > > > > > > > > > > > > > > > "Reda G" <RedaG[ at ]discussions.microsoft.com> wrote in > > > > > > > > > message > > > > > > > > > news:8BE88880-3146-46C0-9691-4EFE43D31163[ at ]microsoft.com... > > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > > > I am new in Office programming. Sorry if I will repeat > > > > > > > > > > with > > > > > > > > > > my > > > > > > > > > > question, > > > > > > > > > > but > > > > > > > > > > after long searches, I couldn't find a solution to my > > > > > > > > > > problem. > > > > > > > > > > Problem: I am developing shared add - ins for MS > > > > > > > > > > Outlook > > > > > > > > > > 2003, > > > > > > > > > > my > > > > > > > > > > application will create *.pst file with calendar folder > > > > > > > > > > and > > > > > > > > > > that > > > > > > > > > > *.pst > > > > > > > > > > file > > > > > > > > > > will publish on server (Not Exchange server). But after > > > > > > > > > > i > > > > > > > > > > publish > > > > > > > > > > *.pst > > > > > > > > > > file > > > > > > > > > > on server user B, cannot view this file, because is > > > > > > > > > > locked. > > > > > > > > > > I > > > > > > > > > > used > > > > > > > > > > RemoveStore method to remove a folder, but it didn't > > > > > > > > > > solve > > > > > > > > > > my > > > > > > > > > > problem. > > > > > > > > > > How can I solve my problem? > > > > > > > > > > > > > > > > > > > > Thank you so much > > > > > > > > > > Reda > > > > > > > > > > > > > > > > > > > > PS. I don't like any commercial 3rd parties tools.
|
|
|