A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Parse and manipulate pst files in C#



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 19th 08, 01:52 PM posted to microsoft.public.outlook.program_vba
Hemant
external usenet poster
 
Posts: 7
Default Parse and manipulate pst files in C#

At present, we're working on a C# 2005 proj in which we need to retrive the
original Outlook pst files and thoroughly parse them. The proj is about
maintaining a mirror-image of the original Outlook pst file which can be
sync'ed frequently (rather then creating a huge pst file backup).

The real problem is that we need to support Outlook version 2000 and later -
so we're in search of some 'generalized APIs' which can support all the
versions of Outlook. We've tried MAPI, CDO, mapi32.dll, mapi33.dll but none
are consistent and it seems a bit risky to move ahead with them. We also
found links about "Outlook Object Library" but again it is Outlook-version
specific.

There'er a lot of diff approaches and there're many code-snippets using diff
approaches to access Outlook/MAPI, like:

# OOL (Outlook Obj Lib) - though its version specific but if we can create a
dll for each version and then replace the dll as per the version installed on
user's machine then it might work. The quetion is - does it really have good
support for manipulating pst files?

# mapi33.dll & Outlook Redemption - Paid 3rd party options. mapi33.dll says
it is the most optimized approach but I'm not sure how compatible and stable
it is! The same is true for Outlook Redemption (but they have APIs for pst
files). Besides I'm also concerned about the security exceptions. Anything
you know?

# Pinvoke + mapi32.dll - In this approach we use the "Platform
Invoke"(Pinvoke) feature available in .net to access the mapi32.dll directly
(which is otherwise not possible because mapi32.dll is a native dll) - again
not sure how stable this is.

# Misc - Refer CDOSYS.dll, etc.. , 3rd Party tool AddinExpress, etc... but
they don't seem to provide such a magnitude when it comes to features.

I'm a newbie to Outlook programming and I see a lot of diff ways to move
ahead with this proj but from what I've been researching on the net - it
seems that some of the approach might be good initially but they break-down
later on! So, instead of me "reinventing-the-wheel" - if I could have a
little help I'll know in which direction can I dig further.

Any help and/or suggestions will be greatly appreciated.
Ads
  #2  
Old August 19th 08, 03:48 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Parse and manipulate pst files in C#

Any direct use of Extended MAPI in managed code is not supported, so ignore
that option.

I use Redemption all the time and if you set AuthKey and customize the DLL
with custom CLSID's then it's as secure as can be and definitely will allow
you to what you want.

The Outlook object model is always the way to go if the oldest version of
Outlook you need to support has the methods and properties you need for what
you want to do. The rule of thumb is to develop using references to the
oldest Outlook object model tlb and that code will run without change on
older versions. However, I generally counsel against using managed code for
support of Outlook 2000 and 2002 due to deficiencies and bugs in the PIA's
for those versions of Outlook.

All in all, in your situation, I'd go with Redemption myself.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Hemant" wrote in message
...
At present, we're working on a C# 2005 proj in which we need to retrive
the
original Outlook pst files and thoroughly parse them. The proj is about
maintaining a mirror-image of the original Outlook pst file which can be
sync'ed frequently (rather then creating a huge pst file backup).

The real problem is that we need to support Outlook version 2000 and
later -
so we're in search of some 'generalized APIs' which can support all the
versions of Outlook. We've tried MAPI, CDO, mapi32.dll, mapi33.dll but
none
are consistent and it seems a bit risky to move ahead with them. We also
found links about "Outlook Object Library" but again it is Outlook-version
specific.

There'er a lot of diff approaches and there're many code-snippets using
diff
approaches to access Outlook/MAPI, like:

# OOL (Outlook Obj Lib) - though its version specific but if we can create
a
dll for each version and then replace the dll as per the version installed
on
user's machine then it might work. The quetion is - does it really have
good
support for manipulating pst files?

# mapi33.dll & Outlook Redemption - Paid 3rd party options. mapi33.dll
says
it is the most optimized approach but I'm not sure how compatible and
stable
it is! The same is true for Outlook Redemption (but they have APIs for pst
files). Besides I'm also concerned about the security exceptions. Anything
you know?

# Pinvoke + mapi32.dll - In this approach we use the "Platform
Invoke"(Pinvoke) feature available in .net to access the mapi32.dll
directly
(which is otherwise not possible because mapi32.dll is a native dll) -
again
not sure how stable this is.

# Misc - Refer CDOSYS.dll, etc.. , 3rd Party tool AddinExpress, etc... but
they don't seem to provide such a magnitude when it comes to features.

I'm a newbie to Outlook programming and I see a lot of diff ways to move
ahead with this proj but from what I've been researching on the net - it
seems that some of the approach might be good initially but they
break-down
later on! So, instead of me "reinventing-the-wheel" - if I could have a
little help I'll know in which direction can I dig further.

Any help and/or suggestions will be greatly appreciated.


  #3  
Old August 20th 08, 04:26 PM posted to microsoft.public.outlook.program_vba
Hemant
external usenet poster
 
Posts: 7
Default Parse and manipulate pst files in C#



"Ken Slovak - [MVP - Outlook]" wrote:

Any direct use of Extended MAPI in managed code is not supported, so ignore
that option.

I use Redemption all the time and if you set AuthKey and customize the DLL
with custom CLSID's then it's as secure as can be and definitely will allow
you to what you want.

The Outlook object model is always the way to go if the oldest version of
Outlook you need to support has the methods and properties you need for what
you want to do. The rule of thumb is to develop using references to the
oldest Outlook object model tlb and that code will run without change on
older versions. However, I generally counsel against using managed code for
support of Outlook 2000 and 2002 due to deficiencies and bugs in the PIA's
for those versions of Outlook.

All in all, in your situation, I'd go with Redemption myself.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Hemant" wrote in message
...
At present, we're working on a C# 2005 proj in which we need to retrive
the
original Outlook pst files and thoroughly parse them. The proj is about
maintaining a mirror-image of the original Outlook pst file which can be
sync'ed frequently (rather then creating a huge pst file backup).

The real problem is that we need to support Outlook version 2000 and
later -
so we're in search of some 'generalized APIs' which can support all the
versions of Outlook. We've tried MAPI, CDO, mapi32.dll, mapi33.dll but
none
are consistent and it seems a bit risky to move ahead with them. We also
found links about "Outlook Object Library" but again it is Outlook-version
specific.

There'er a lot of diff approaches and there're many code-snippets using
diff
approaches to access Outlook/MAPI, like:

# OOL (Outlook Obj Lib) - though its version specific but if we can create
a
dll for each version and then replace the dll as per the version installed
on
user's machine then it might work. The quetion is - does it really have
good
support for manipulating pst files?

# mapi33.dll & Outlook Redemption - Paid 3rd party options. mapi33.dll
says
it is the most optimized approach but I'm not sure how compatible and
stable
it is! The same is true for Outlook Redemption (but they have APIs for pst
files). Besides I'm also concerned about the security exceptions. Anything
you know?

# Pinvoke + mapi32.dll - In this approach we use the "Platform
Invoke"(Pinvoke) feature available in .net to access the mapi32.dll
directly
(which is otherwise not possible because mapi32.dll is a native dll) -
again
not sure how stable this is.

# Misc - Refer CDOSYS.dll, etc.. , 3rd Party tool AddinExpress, etc... but
they don't seem to provide such a magnitude when it comes to features.

I'm a newbie to Outlook programming and I see a lot of diff ways to move
ahead with this proj but from what I've been researching on the net - it
seems that some of the approach might be good initially but they
break-down
later on! So, instead of me "reinventing-the-wheel" - if I could have a
little help I'll know in which direction can I dig further.

Any help and/or suggestions will be greatly appreciated.



  #4  
Old August 20th 08, 09:51 PM posted to microsoft.public.outlook.program_vba
Hemant
external usenet poster
 
Posts: 7
Default Parse and manipulate pst files in C#

# Cloning Outlook pst:
This is what the app is about - we're going to clone the Outlook pst and
maintain a mirror image. Initially we'll need to clone the structure and copy
each item from the original Outlook pst. This is the first time the user
accesses our app. For each subsequent access we'll only compare both the psts
and add what is new in the Outlook pst. This is like physically maintaining a
backup copy of the original pst.
The idea is to kep this copy in a flash-drive which will make everything
portable (we don't want that everytime the user wants to carry all his email
- he needs to copy-paste the huge pst file - it is sensitive so we dn't want
to touch it)
I hope this makes sense.

We've started with two approaches -
# OOL (Outlook Obj Lib)
# OR (Outlook Redemption)
but honestly speaking the resources on net are scarce. I mean there's no
detailed or clear sample but its hard to find.

We're newbie. I see this is just the begining and there's a lot more coming
for us - it'll be a steep learning curve. Can you provide us some material or
some online documentation where we can expect to dig less and get more.
  #5  
Old August 21st 08, 03:00 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Parse and manipulate pst files in C#

Most of the Redemption code samples are on the Redemption Web site. For
other code samples see www.outlookcode.com. Those are the best resources for
what you're doing.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Hemant" wrote in message
...
# Cloning Outlook pst:
This is what the app is about - we're going to clone the Outlook pst and
maintain a mirror image. Initially we'll need to clone the structure and
copy
each item from the original Outlook pst. This is the first time the user
accesses our app. For each subsequent access we'll only compare both the
psts
and add what is new in the Outlook pst. This is like physically
maintaining a
backup copy of the original pst.
The idea is to kep this copy in a flash-drive which will make everything
portable (we don't want that everytime the user wants to carry all his
email
- he needs to copy-paste the huge pst file - it is sensitive so we dn't
want
to touch it)
I hope this makes sense.

We've started with two approaches -
# OOL (Outlook Obj Lib)
# OR (Outlook Redemption)
but honestly speaking the resources on net are scarce. I mean there's no
detailed or clear sample but its hard to find.

We're newbie. I see this is just the begining and there's a lot more
coming
for us - it'll be a steep learning curve. Can you provide us some material
or
some online documentation where we can expect to dig less and get more.


  #6  
Old August 21st 08, 03:24 PM posted to microsoft.public.outlook.program_vba
Hemant
external usenet poster
 
Posts: 7
Default Parse and manipulate pst files in C#

If you were suppose to work on this proj - that is mirror the original
Outlook pst and then your app will kep it "sync'ed" with the original Outlook
pst as and when you open that app and it'll also allow manipulating that
mirror-pst in the same manner as in Outlook (i.e. only move, archive and
delete). and some otehr features around pst and also manipulating the
Original Outlook pst.

- in such case what kind of approach would you prefer and which platform
will you prefer. Our proj is in the initial phase and hence I've not
concluded anything, as .Net v3.5 is the latest tech - we intended to use it.
Infact this is the first case when we've realized that somethings are better
in native code(vb6/c++).

Pls tell me what technology, platform and tools would you suggest.

"Ken Slovak - [MVP - Outlook]" wrote:

Most of the Redemption code samples are on the Redemption Web site. For
other code samples see www.outlookcode.com. Those are the best resources for
what you're doing.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Hemant" wrote in message
...
# Cloning Outlook pst:
This is what the app is about - we're going to clone the Outlook pst and
maintain a mirror image. Initially we'll need to clone the structure and
copy
each item from the original Outlook pst. This is the first time the user
accesses our app. For each subsequent access we'll only compare both the
psts
and add what is new in the Outlook pst. This is like physically
maintaining a
backup copy of the original pst.
The idea is to kep this copy in a flash-drive which will make everything
portable (we don't want that everytime the user wants to carry all his
email
- he needs to copy-paste the huge pst file - it is sensitive so we dn't
want
to touch it)
I hope this makes sense.

We've started with two approaches -
# OOL (Outlook Obj Lib)
# OR (Outlook Redemption)
but honestly speaking the resources on net are scarce. I mean there's no
detailed or clear sample but its hard to find.

We're newbie. I see this is just the begining and there's a lot more
coming
for us - it'll be a steep learning curve. Can you provide us some material
or
some online documentation where we can expect to dig less and get more.



  #7  
Old August 21st 08, 07:49 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Parse and manipulate pst files in C#

As I said before, I'd be using Redemption.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Hemant" wrote in message
...
If you were suppose to work on this proj - that is mirror the original
Outlook pst and then your app will kep it "sync'ed" with the original
Outlook
pst as and when you open that app and it'll also allow manipulating that
mirror-pst in the same manner as in Outlook (i.e. only move, archive and
delete). and some otehr features around pst and also manipulating the
Original Outlook pst.

- in such case what kind of approach would you prefer and which platform
will you prefer. Our proj is in the initial phase and hence I've not
concluded anything, as .Net v3.5 is the latest tech - we intended to use
it.
Infact this is the first case when we've realized that somethings are
better
in native code(vb6/c++).

Pls tell me what technology, platform and tools would you suggest.


  #8  
Old August 23rd 08, 08:28 AM posted to microsoft.public.outlook.program_vba
Hemant
external usenet poster
 
Posts: 7
Default Parse and manipulate pst files in C#

We're planning to use Outlook Redemption library for our Outlook product. Our
proj is in C# 2005. We've tested some initial pst-processing using the
developer version of OR and it seems to be working fine. Based on your
expertise and exprience I'd like to clear some of my doubts:


#1. Firstly I'd like to know if it'll work fine on the .Net platform in
long-term (i.e. for extended functionalities)?
#2. Would you prefer using vb6 over C#/vb.Net due to any reason (because
Extended MAPI being unmanaged code is NOT supported in .Net)
#3. If you can tell me honestly whether we shud go for OR or use the MAPI in
vb6 for this proj - I'll trust you on this one.
#4. Ours is a windows app - so how can we ship OR with our app? What about
liscensing/cost for such product development - any idea?
#5. Can we expect full technical support once we're 'liscensed'?

Thank you.
  #9  
Old August 25th 08, 02:52 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Parse and manipulate pst files in C#

#1. I use Redemption all the time with managed code, and specifically with
C#.

#2. Since I don't code directly in Extended MAPI (C++ or Delphi only) I use
Redemption in both unmanaged code (VB6/VBA/VBScript) as well as with managed
code (C#, VB.NET).

#3. Since Extended MAPI can only be directly programmed using C++ or Delphi
(other than some hacks using VB) I don't think that's an option.

#4. You deploy Redemption just as you would any other DLL, how depends on
the installer you're using. I'm not sure about licensing costs for the
developer version of Redemption, you'd have to contact them for that
information. Just make sure to use the AuthKey property and to customize the
class names and CLSID's for Redemption to make it fully secure and immune
from interaction with other programs using Redemption.

#5. Dmitry is real good at providing support.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Hemant" wrote in message
...
We're planning to use Outlook Redemption library for our Outlook product.
Our
proj is in C# 2005. We've tested some initial pst-processing using the
developer version of OR and it seems to be working fine. Based on your
expertise and exprience I'd like to clear some of my doubts:


#1. Firstly I'd like to know if it'll work fine on the .Net platform in
long-term (i.e. for extended functionalities)?
#2. Would you prefer using vb6 over C#/vb.Net due to any reason (because
Extended MAPI being unmanaged code is NOT supported in .Net)
#3. If you can tell me honestly whether we shud go for OR or use the MAPI
in
vb6 for this proj - I'll trust you on this one.
#4. Ours is a windows app - so how can we ship OR with our app? What about
liscensing/cost for such product development - any idea?
#5. Can we expect full technical support once we're 'liscensed'?

Thank you.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to manipulate outlook appointment? Markus R. Keßler Outlook - Calandaring 0 November 28th 07 02:10 PM
Programmatically manipulate form regions robert Outlook - Using Forms 2 May 23rd 07 09:14 PM
Parse for URL's Zigman53 Outlook and VBA 2 October 15th 06 07:52 PM
Can I manipulate the Calendar print templates beyond page setup? Lisa Outlook - Calandaring 0 March 20th 06 11:06 PM
Parse .msg file Vadivel Outlook - Using Forms 1 March 15th 06 05:26 PM


All times are GMT +1. The time now is 08:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.