So like I’ve said in my former posting, now I will talk a little about outlook VSTO. The reference for outlook is sufficient I believe, but still, in general VSTO documentation is hard to get 😦 I created this for my college assignment. The assignment spec is to create digital signature add ins in outlook. And for this assignment, I’m using C#. In this post, I won’t talk about the practical side of cryptography. There is abundant information about that on net, and for you guys who is using C# there’s Bouncy Castle library ( this library is good for implementing cryptographic function in C# ^.^ ). What I’ll talk in this post is about the general software engineering principle.
My apps screenshot
Requirement, analysis, and design
I will mix all of these phases in here, cos I won’t talk about the mini mitty cryptographic technical description here. So what I need is a interface in Outlook to call the cryptographic function that has been supplied by my friend. My task is simply interfacing the function that’s given to me, easy piecy… But… it is not that simple guys 🙂 Like I’ve said before, the problem is located on documentation 😦 The specification is to embed the signature when composing email, and check the signature when we read the inbox. For this problem, I’m considering in using ribbon or task pane custom button. But, the requirement is for the button to come up in composing and mail checking page only (imagine if the signature coming up in option pages, it is simply not needed right :D). At the end I found that creating custom task pane is not efficient for this case. Task pane cannot locked to come up on required pages only ( and it need to be hardcoded like java anyway 😦 ). The lock capability is the capability of ribbon component. So, I’m choosing ribbon component, that’s locked to inbox and compose pages only.
Email Property Modification
Outlook.MailItem mailItem = (Outlook.MailItem)Globals.ThisAddIn.Application.ActiveInspector().CurrentItem;
mailItem.Body = “This is the new Email body”;
mailItem.To = “email@example.com”;
So for this problem, I’m only manipulating this property. When you have created the current mailitem, you can change the from, to, subject, and body element of the email. Just use the appropriate attribute for them. My apps is somehow complex. But on the VSTO side, I’m only use this property. Current item is the main property that need to be known when you guys want to develop Outlook VSTO. After you know this main key, you can create nearly all apps you need with Outlook VSTO.