最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

jquery - Creating an addin for Outlook using javascript - Stack Overflow

programmeradmin0浏览0评论

I've seen the jello-dashboard for Outlook which adds Getting Things Done (GTD) functionality to Outlook. I'm taken by the fact that it only uses javascript to do this (using extjs). Previously I thought that any add-in dev for MS products were obliged to use VBA on C# or one of the other MS technologies. I've looked through some of the jello-dashboard js files but haven't been able to see (or understand) where it uses what I presume is an API to modify Outlook behaviour.

This is all in the hope of creating an add-in which will add delicious like functionality to Outlook, i.e. filtering of e-mails using a tag-cloud approach (based on Outlook categories)

I'd appreciate if anyone has pointers on where I could find the information/examples/tutorials on this javascript => Outlook hookup. I've had no luck on das web but starting from a point of ignorance my searches may be badly formed.

Best regards / Colm

I've seen the jello-dashboard for Outlook which adds Getting Things Done (GTD) functionality to Outlook. I'm taken by the fact that it only uses javascript to do this (using extjs). Previously I thought that any add-in dev for MS products were obliged to use VBA on C# or one of the other MS technologies. I've looked through some of the jello-dashboard js files but haven't been able to see (or understand) where it uses what I presume is an API to modify Outlook behaviour.

This is all in the hope of creating an add-in which will add delicious. like functionality to Outlook, i.e. filtering of e-mails using a tag-cloud approach (based on Outlook categories)

I'd appreciate if anyone has pointers on where I could find the information/examples/tutorials on this javascript => Outlook hookup. I've had no luck on das web but starting from a point of ignorance my searches may be badly formed.

Best regards / Colm

Share Improve this question asked Feb 21, 2012 at 16:49 carbontrackingcarbontracking 1,0894 gold badges19 silver badges34 bronze badges 1
  • 4 Outlook AddIns are fundamentally COM. What I suspect this AddIn is doing is embedding a IWebBrowser2 to host Internet Explorer inside of Outlook and they handle external JavaScript events in their document via COM. – vcsjones Commented Feb 21, 2012 at 16:53
Add a ment  | 

1 Answer 1

Reset to default 5

Jello isn't really an add-in, per se. What it is doing is basically using a trick. That trick is to create a new folder in Outlook. Then, right click on the new folder and select properties. Then click on the "Home Page" tab. Check the box that says "Show home page by default for this folder". Then in Address type in the address of an html page. E.g., C:\test.html.

Here is some code I whipped up that will show you the subject of the newest message in your inbox that you can paste into C:\test.html

<script>

    var ol = window.external.OutlookApplication;

    function GetCurrentItem(){  
        var ns=ol.GetNameSpace("MAPI");
        var inbox=ns.GetDefaultFolder(6);
        var items = inbox.Items;
        items.Sort("ReceivedTime", true);
        alert(items(1).Subject);    
    }

</script>


<input type=button onclick="GetCurrentItem()" value="GetCurrentItem">
发布评论

评论列表(0)

  1. 暂无评论