Help!

Developing add-in for outlook2003 using VSTO2005SE


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Program Add-Ins RSS
Next:  Comman Button in Word Form  
Author Message
Jagan_m



Joined: Dec 21, 2007
Posts: 1



PostPosted: Fri Dec 21, 2007 9:33 am    Post subject: Developing add-in for outlook2003 using VSTO2005SE

I am helpless in developin an add-in. for that i have installed VSTO2005SE, VSTO2005SE runtime, PIAS, but how to develop i am not getting. I have downloaded some example projects. but those are in VB.net. but i have to work on C#. Please help anybody.

I am very thankfull to you in advance.....
Back to top
ananthab



Joined: Jan 11, 2008
Posts: 1



PostPosted: Fri Jan 11, 2008 5:23 am    Post subject:

Hi,
check this out!
put it in thisapplication.cs
add redemption dll reference
you lll see the incoming mails icons changed
Outlook.MailItem MailItems;
int PR_ICON_INDEX;
PR_ICON_INDEX = 0x10800003;
try
{
if ((GetNamespace("MAPI").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Items.Count > 0))
{
MailItems = GetNamespace("MAPI").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Items[1] as Outlook.MailItem;
Redemption.SafeMailItem safeMail = new Redemption.SafeMailItem();
safeMail.Item = MailItems;
Redemption.MAPIUtils mapiUtils = new Redemption.MAPIUtils();
mapiUtils.HrSetOneProp(MailItems, PR_ICON_INDEX, 1012, true);


Outlook.MailItem MailItems2;
MailItems2 = GetNamespace("MAPI").GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox).Items[2] as Outlook.MailItem;
Redemption.SafeMailItem safeMail2 = new Redemption.SafeMailItem();
safeMail2.Item = MailItems2;
Redemption.MAPIUtils mapiUtils2 = new Redemption.MAPIUtils();
mapiUtils2.HrSetOneProp(MailItems2, PR_ICON_INDEX, 1014, true);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.InnerException.ToString());
}
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum