using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Outlook = Microsoft.Office.Interop.Outlook;

namespace wx_base
{
    public partial class Frm_T1 : Form
    {

public Frm_T1()
        {
            InitializeComponent();
        }

private void button1_Click(object sender, EventArgs e)
        {
            // dll 调用 Microsoft.Office.Interop.Outlook (注意不同的Office 版本)

// http://blog.sina.com.cn/s/blog_69c72c7c0101kkwe.html
            // http://www.tulaoshi.com/n/20160219/1603005.html
            // https://www.baidu.com/s?wd=C%23%20Office%20Outlook%20%E7%BA%A6%E4%BC%9A&pn=30&oq=C%23%20Office%20Outlook%20%E7%BA%A6%E4%BC%9A&tn=monline_3_dg&ie=utf-8&rsv_idx=1&rsv_pq=ad2cdabd000dd6cd&rsv_t=7866XcCJw92Dm6hipr3OdaCDvKep2NcCDjpjbsyujR%2FSstifP92iaNfHnUj1aeDcZp8I&rsv_page=1
            // C# Office Outlook 约会

// https://msdn.microsoft.com/zh-cn/ff869762

//
            CreateAppointment(System.Convert.ToDateTime("2016-03-29 15:25:26"), System.Convert.ToDateTime("2016-03-29 18:28:26"), 10, "标题", "测试内容");

}

#region  约会.

///
        /// 创建约会.
        ///
        /// 开始时间
        /// 结束时间
        /// 提前多长时间提醒
        /// 标题
        /// 内容
        public void CreateAppointment(
            DateTime satrtDateTime,
            DateTime endDateTime,
            int reminderMinutesBeforeStart,
            string subject,
            string body
            )
        {
            // 创建约会.

//Outlook.AppointmentItem outLookAppointmentItem = (Outlook.AppointmentItem)
            //outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);

// Outlook.ApplicationClass oApp = new Microsoft.Office.Interop.Outlook.ApplicationClass();
            //会议是约会的一种
            //Outlook.AppointmentItem oItem = (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);
            //oItem.MeetingStatus = Outlook.OlMeetingStatus.olMeeting;

// 创建 OUTLOOK APP
            Microsoft.Office.Interop.Outlook.Application outlookApp = new Microsoft.Office.Interop.Outlook.Application();
            Outlook.AppointmentItem outLookAppointmentItem =
                (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);

// 开始时间
            outLookAppointmentItem.Start = satrtDateTime;
            // 结束时间
            outLookAppointmentItem.End = endDateTime;

// 提前多长时间提醒
            outLookAppointmentItem.ReminderMinutesBeforeStart = reminderMinutesBeforeStart;
            // 标题
            outLookAppointmentItem.Subject = subject;
            // 内容
            outLookAppointmentItem.Body = body;

// 保存.
            outLookAppointmentItem.Save();

}

#endregion
        //
    }
}

20160330001 调用及触发Office Outlook 约会的更多相关文章

  1. Delphi 发送邮件 通过Office Outlook

    Delphi 发送邮件 通过Office Outlook 网上搜到的Delphi邮件发送系统,绝大多数是使用SMTP协议来发送. 但是事实上它们已经过时了,大多数邮件服务器已经屏蔽了Delphi In ...

  2. office outlook 無法開啟 outlook 視窗

    例如[無法啟動Microsoft Office Outlook.無法開啟Outlook 視窗.] 1.啟動 Outlook 安全模式outlook.exe /safe2.清除並重新產生目前設定檔的功能 ...

  3. JavaScript API for Office Outlook Add-in - “一页纸文档“

    上一篇文章 Office Add-in Model 为 Outlook Mail Add-in 提供的 JavaScript API 介绍 ,简单地在表格中列出了所有的 Object 定义,但是个人感 ...

  4. jQuery实现自动调用和触发某个事件的方法

    1.比如我们通过jquery定义了一个点击事件,我们如何自动触发他: $(function(){    $('#button').click(function(){      alert('butto ...

  5. Office - Outlook

    将邮件存到本地 服务器容量有限,避免丢失和经常提示容量不足 步骤 在File->Account Settings->Account Settings下面 在Data Files标签页新建一 ...

  6. 配置Office Outlook 2013

    导航 背景——配置过程——错误(Error)——参考资料 背景 最近,折腾了一阵子邮箱客户端,包括:Foxmail.thuderbird.outlook:最后,考虑到outlook对文本的强大的支持能 ...

  7. 在Office Outlook 2013中收发QQ邮件

    选择手动配置 选择第三项 点击More Settings,在Outgoing  Server 勾选 如下 确认后,按下一步完成配置,此时会弹出对话框进行邮件发送测试.

  8. C# 调用 Outlook发送邮件实例

    添加引用:Microsoft.Office.Interop.Outlook using System; using System.Collections.Generic; using System.L ...

  9. jira webhook 事件触发并程序代码调用jenkins接口触发构建操作

    要解决的问题 开发管理工具触发站点构建事件,事件处理中需要调用Jenkins接口开始构建动作. 我的应用场景: 使用jira作为管理工具,在jira中创建自定义的工作流来规定测试,上线,发布等流程,并 ...

随机推荐

  1. respond.js

    Respond.js,低版本浏览器也能够支持媒体查询 在之前有篇文章也是介绍IE6,7,8支持媒体查询的(查看),Respond.js这个比css3-mediaqueries更为强大一些,它可以支持l ...

  2. 使用Fiddler的X5S插件查找XSS漏洞

    OWASP top 10的安全威胁中的CrossSite Scripting(跨站脚本攻击),允许攻击者通过浏览器往网站注入恶意脚本.这种漏洞经常出现在web应用中需要用户输入的地方,如果网站有XSS ...

  3. iOS -- AVAudioPlayer播放音乐

    一. AVAudioPlayer:                          声明音乐控件AVAudioPlayer,必须声明为全局属性变量,否则可能不会播放,AVAudioPlayer只能播 ...

  4. gvim配置

    colorscheme darkblue set lines=100 set columns=150

  5. 新广告法,极限词剔除,替换掉的mysql语句

    国家级,世界级,最高级, 最佳,最大,第一, 唯一,首个,首选, 最好,最大,精确, 顶级,最高,最低, 最,最具,最便宜, 最新,最先进,最大程度, 最新技术,最先进科学,国家级产品, 填补国内空白 ...

  6. 【SIGGRAPH】用【有说服力的照片真实】技术实现最终幻想15的视觉特效

    原文:西川善司 http://www.4gamer.net/games/075/G007535/20160726064/   最终幻想15的演讲会场.相当大,听众非常多.      在本次计算机图形和 ...

  7. soap request by afnetworking2.X/3.X

    for 2.X 参考 http://jiapumin.iteye.com/blog/2109378 AFHTTPRequestOperationManager *manager = [AFHTTPRe ...

  8. Java中的virtual method

    今天看jcvm的标准的 时候,看到有一个virtual method,感觉很疑惑,以前看Java的时候并没有发现有这类方法. 百度.Google了一下,才发现,Java中普通方法就是virtual m ...

  9. IE8兼容H5语义标签

    //IE浏览器定义的特殊属性,通过hack方式判断IE版本来执行不同的代码,IE8以下浏览器自动创建html5语义标签,从而实现兼容<!--[if lte IE 8] <script sr ...

  10. Bootstrap 轮播插件

    一.轮播 //基本实例. <div id="myCarousel" class="carousel slide"> <ol class=&qu ...