通过C#修改Outlook OFT文件 [英] Modifying Outlook OFT files via C#

查看:180
本文介绍了通过C#修改Outlook OFT文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的情况是,我有大量的.OFT,Outlook模板文件,大约有1000个.

My scenario is that I have a huge number of .OFT, Outlook Template files, around 1000.

它们都需要进行编辑并保存为新的联系信息(更新收件人"和抄送"行).

They all need to be edited and saved with new contact information (updating the To and CC lines).

我过去使用过Outlook C#API,但从未使用过.oft文件.是否可以读取.oft文件,修改需要修改的文件,然后通过API保存回.oft?

I have worked with the Outlook C# API in the past but never with .oft files. Is it possible to read the .oft files, modify that needs to be modified and then save back to .oft via the API?

推荐答案

您可以

  1. 使用 Application.CreateItemFromTemplate ,对其进行修改,然后另存为OFT文件( MailItem.SaveAs (...,olTemplate)).

  1. Create a new item in Outlook using Application.CreateItemFromTemplate, modify it, then save as an OFT file (MailItem.SaveAs(..., olTemplate)).

使用兑换使用

Use Redemption to directly open OFT files using RDOSession.GetMessageFromMsgFile, modify them, then save as a new files (RDOMail.SaveAs(..., olTemplate)).

这篇关于通过C#修改Outlook OFT文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆