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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to archive mails using VSTO 3.0



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 5th 09, 03:51 AM posted to microsoft.public.outlook.program_addins
Pradeep Yamujala
external usenet poster
 
Posts: 2
Default How to archive mails using VSTO 3.0

Hi all,

I am developing a outlook plugin for one organization. In one of the
requirment i have to archive a mail, and retrive back when ever necessory. I
need to do searching also.

But unfortunatly i am not getting goon info about how to?. Please
help me how to perform archiving function using C# in VSTO.

Thanks in advance.
Ads
  #2  
Old February 5th 09, 02:59 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to archive mails using VSTO 3.0

Archive what email? How is it selected or identified? Where is it located?
Archive to where? Provide actual details of what you want so people don't
have to try to read your mind over the Internet, that doesn't work very
well.

--
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


"Pradeep Yamujala" wrote in
message ...
Hi all,

I am developing a outlook plugin for one organization. In one of
the
requirment i have to archive a mail, and retrive back when ever necessory.
I
need to do searching also.

But unfortunatly i am not getting goon info about how to?. Please
help me how to perform archiving function using C# in VSTO.

Thanks in advance.


  #3  
Old February 6th 09, 03:41 AM posted to microsoft.public.outlook.program_addins
Pradeep Yamujala
external usenet poster
 
Posts: 2
Default How to archive mails using VSTO 3.0

Hi Ken,

In my client environment, they are using exchange server. In that
they created few shared inboxes. All the users has their own dedicated mail
accounts. These shared inboxes attached to the dedicated mail accounts so
that when they login able to retrive these inboxes.

As per my knowledge the archival file might be in the exchange
server only. What my plugin must do is, what ever mail they selected must go
in archives oncce he clicked on "Archive" button. Also I must search the
mails in archives also, if user wants he can retrive the same.

At this point i want to know how to pweform this archival
operation using VSTO 3.0 and C#. And also how to search in the archive folder.

I hope this explains my doubt. Please help me to solve this problem.

Thanks
Pradeep Yamujala.
------------------------------------------------------------------------------------------

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

Archive what email? How is it selected or identified? Where is it located?
Archive to where? Provide actual details of what you want so people don't
have to try to read your mind over the Internet, that doesn't work very
well.

--
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


"Pradeep Yamujala" wrote in
message ...
Hi all,

I am developing a outlook plugin for one organization. In one of
the
requirment i have to archive a mail, and retrive back when ever necessory.
I
need to do searching also.

But unfortunatly i am not getting goon info about how to?. Please
help me how to perform archiving function using C# in VSTO.

Thanks in advance.



  #4  
Old February 6th 09, 02:54 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to archive mails using VSTO 3.0

To get a shared Inbox folder you would use
NameSpace.GetSharedDefaultFolder(). That method takes a Recipient object and
folder type as arguments. The Recipient is the owner of the mailbox, the
type would be a member of the OlDefaultFolders enum, in this case
olFolderInbox.

A selected item in the current folder view is
Application.ActiveExplorer.Selection[1]. You can test for
Application.ActiveExplorer.Selection.Count to see how many items are
selected. You can test for that item's Class property to make sure it's a
mail item. That would be OlObjectClass.olMail.

You have to explain what you mean by "As per my knowledge the archival file
might be in the exchange
server only.", that could be anywhere. Assuming you mean the archive folder
is in the Exchange public folders store just below the All Public Folders
location then you'd use something like this:

// ns is an instantiated NameSpace object
Outlook.MAPIFolder folder =
ns.GetDefaultFolder(Outlook.OlDefaultFolders.olPub licFoldersAllPublicFolders).Folders["Archive"];

You would then use the Move() function for the item to be archived to move
it to that archive folder.

You can then store the EntryID of the moved item for future reference, along
with the StoreID of the public folder to be able to retrieve it later using
NameSpace.GetItemFromID(). Or you can search the Items collection of the
archive folder using any property you want using either the Find() or
Restrict() methods of the Items collection, or you can do a brute force
search in the folder to match whatever property you are searching on.

For future reference you should always provide as much information as
possible, including the version or versions of Outlook you want to 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


"Pradeep Yamujala" wrote in
message ...
Hi Ken,

In my client environment, they are using exchange server. In that
they created few shared inboxes. All the users has their own dedicated
mail
accounts. These shared inboxes attached to the dedicated mail accounts so
that when they login able to retrive these inboxes.

As per my knowledge the archival file might be in the exchange
server only. What my plugin must do is, what ever mail they selected must
go
in archives oncce he clicked on "Archive" button. Also I must search the
mails in archives also, if user wants he can retrive the same.

At this point i want to know how to pweform this archival
operation using VSTO 3.0 and C#. And also how to search in the archive
folder.

I hope this explains my doubt. Please help me to solve this problem.

Thanks
Pradeep Yamujala.
------------------------------------------------------------------------------------------


 




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
Outlook 2007 Auto Archive - Cannot read archive properties from fo Deputy5211 Outlook - General Queries 2 January 23rd 08 06:05 AM
Archive only 'Read e-mails' Nabeel Outlook - General Queries 8 January 12th 08 10:17 AM
E-mails Being Deleted When Moving From Archive to Inbox Jason H.[_2_] Outlook - General Queries 1 October 1st 07 07:57 PM
Auto- or Manual- Archive from IMAP to the Archive Folders doesn't work? Alan Outlook - General Queries 7 April 15th 07 12:06 AM
problems creating a archive file to archive old emails .·:m·a·r·l·a:·. Outlook - General Queries 1 September 26th 06 09:18 PM


All times are GMT +1. The time now is 06:47 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.