简体   繁体   English

使用JavaScript为Outlook创建插件

[英]Creating an addin for Outlook using javascript

I've seen the jello-dashboard for Outlook which adds Getting Things Done (GTD) functionality to Outlook. 我已经看到了用于Outlook的jello-dashboard ,它为Outlook添加了“完成事情(GTD)”功能。 I'm taken by the fact that it only uses javascript to do this (using extjs). 我被它仅使用javascript来做到这一点(使用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. 以前,我认为MS产品的任何外接开发人员都必须在C#或其他MS技术之一上使用VBA。 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. 我浏览了一些jello-dashboard js文件,但无法看到(或理解)它使用我认为是API修改Outlook行为的位置。

This is all in the hope of creating an add-in which will add delicious.com like functionality to Outlook, ie filtering of e-mails using a tag-cloud approach (based on Outlook categories) 所有这些都是希望创建一个加载项,该加载项将为Outlook添加类似于Delicious.com之类的功能,即使用标签云方法(基于Outlook类别)过滤电子邮件。

I'd appreciate if anyone has pointers on where I could find the information/examples/tutorials on this javascript => Outlook hookup. 如果有人能找到可以在此javascript => Outlook联播网上找到信息/示例/教程的指针,我将不胜感激。 I've had no luck on das web but starting from a point of ignorance my searches may be badly formed. 我在das网站上没有运气,但是从无知的角度出发,我的搜索可能会形成错误的形式。

Best regards / Colm 最好的问候/ Colm

Jello isn't really an add-in, per se. Jello本身并不是一个真正的插件。 What it is doing is basically using a trick. 它所做的基本上是使用技巧。 That trick is to create a new folder in Outlook. 该技巧是在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. 然后在“地址”中输入html页面的地址。 Eg, C:\\test.html. 例如,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 这是我整理的一些代码,它将向您显示收件箱中最新消息的主题,您可以将其粘贴到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">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM