20160330001 调用及触发Office Outlook 约会
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 约会的更多相关文章
- Delphi 发送邮件 通过Office Outlook
Delphi 发送邮件 通过Office Outlook 网上搜到的Delphi邮件发送系统,绝大多数是使用SMTP协议来发送. 但是事实上它们已经过时了,大多数邮件服务器已经屏蔽了Delphi In ...
- office outlook 無法開啟 outlook 視窗
例如[無法啟動Microsoft Office Outlook.無法開啟Outlook 視窗.] 1.啟動 Outlook 安全模式outlook.exe /safe2.清除並重新產生目前設定檔的功能 ...
- JavaScript API for Office Outlook Add-in - “一页纸文档“
上一篇文章 Office Add-in Model 为 Outlook Mail Add-in 提供的 JavaScript API 介绍 ,简单地在表格中列出了所有的 Object 定义,但是个人感 ...
- jQuery实现自动调用和触发某个事件的方法
1.比如我们通过jquery定义了一个点击事件,我们如何自动触发他: $(function(){ $('#button').click(function(){ alert('butto ...
- Office - Outlook
将邮件存到本地 服务器容量有限,避免丢失和经常提示容量不足 步骤 在File->Account Settings->Account Settings下面 在Data Files标签页新建一 ...
- 配置Office Outlook 2013
导航 背景——配置过程——错误(Error)——参考资料 背景 最近,折腾了一阵子邮箱客户端,包括:Foxmail.thuderbird.outlook:最后,考虑到outlook对文本的强大的支持能 ...
- 在Office Outlook 2013中收发QQ邮件
选择手动配置 选择第三项 点击More Settings,在Outgoing Server 勾选 如下 确认后,按下一步完成配置,此时会弹出对话框进行邮件发送测试.
- C# 调用 Outlook发送邮件实例
添加引用:Microsoft.Office.Interop.Outlook using System; using System.Collections.Generic; using System.L ...
- jira webhook 事件触发并程序代码调用jenkins接口触发构建操作
要解决的问题 开发管理工具触发站点构建事件,事件处理中需要调用Jenkins接口开始构建动作. 我的应用场景: 使用jira作为管理工具,在jira中创建自定义的工作流来规定测试,上线,发布等流程,并 ...
随机推荐
- JAVA 往jar包添加class文件
(1) jar -uf jarfile.jar yourclasses (2) 右击要打包的文件夹,选择“添加到压缩文件”,弹出对话框: 把压缩文件格式改为zip,再把压缩文件名中的反缀改为.jar, ...
- C#编程总结 字符转码
为了适应某种特殊需要,字符需要根据规则进行转码,便于传输.展现以及其他操作等. 看看下面的转码,就知道他的用处了. 1.字符串转码 根据原编码格式与目标编码格式,完成转换.不过可能出现乱码哦.上一章已 ...
- 使用MyBatis Generator生成DAO
虽然MyBatis很方便,但是想要手写全部的mapper还是很累人的,好在MyBatis官方推出了自动化工具,可以根据数据库和定义好的配置直接生成DAO层及以下的全部代码,非常方便. 需要注意的是,虽 ...
- CentOS 6.6 安装 PHP Memcached 扩展
PHP 的 Memcached扩展使用了 libmemcached 库提供的 api 与 memcached 服务端进行交互.它同样提供了一个 session 处理器(memcached). PHP ...
- NEC学习 ---- 模块 - tab[含标题]
简要介绍, 默认居左, Tab不定宽, “标题”和“更多”可删, 扩展类可以自由组合, 依赖于reset.css(之前的模块以及布局都依赖这个css) 那么这个效果是怎么实现的呢? CSS代码: . ...
- 解决ssh登录后闲置时间过长而断开连接
++++++++++++++++++++++++++++ #!/usr/bin/env bash password_5="Uxxx7"host_5="129.x.x.1 ...
- sql 在not in 子查询有null值情况下经常出现的陷阱
如果下:TempSalesPriceFixedValues表和SalesPriceFixedValues表,要求查询出在TempSalesPriceFixedValues表中且不在SalesPrice ...
- NPOI操作excel之写入数据到excel表
在上一篇<NPOI操作excel之读取excel数据>我们把excel数据写入了datatable中,本篇就讲如何把datatable数据写入excel中. using System; u ...
- 如何用按钮的click事件去触发a标签的click事件
在jQquery中,可以用如下方式触发input.a标签的click事件: <input id="my_input" /> <a id="my_a&qu ...
- 深度学习笔记(四)VGG14
Very Deep Convolutional Networks for Large-Scale Image Recognition 1. 主要贡献 本文探究了参数总数基本不变的情况下,CNN随着层数 ...