简体   繁体   English

从 Outlook 电子邮件中提取数据

[英]Extracting the data from an outlook email

Been looking around for code to play with, but to no avail.一直在寻找可以玩的代码,但无济于事。 I tried here , really do not wish to go through it one by one.我试过这里,实在不想一一去。

I have an Email body that has lots of stuff to extract, difference is unlike the mail in the link there is no colon to help split them up.我有一个电子邮件正文,里面有很多东西要提取,不同之处在于链接中的邮件没有冒号来帮助拆分它们。

Applicant   :   XXX XXXX XXXX

Approving Officer   :   XXX XXX XXXX

Applicant, Your leave application has been approved/rejected. Please view the status.

From        To          Leave Type              Full/1.5D/AM/PM                     Duration    Status              Covering Officer    
----------  ----------  ----------------------  --------------------------------    --------    ------------------  ------------------ 
DD/MM/YYYY  DD/MM/YYYY  Family Leave            FULL                                1           Leave Approved  

What you see here is a generated email by the system.您在此处看到的是系统生成的电子邮件。 Any ideas?有任何想法吗?

The Outlook object model provides three different ways for working with item bodies: Outlook 对象模型提供了三种不同的处理项目正文的方法:

  1. Body - a plain text.正文 - 纯文本。
  2. HTMLBody - an HTML markup. HTMLBody - HTML 标记。
  3. The Word Editor.文字编辑器。 Outlook uses Word as an email editor, so you can use it to format the email message. Outlook 使用 Word 作为电子邮件编辑器,因此您可以使用它来设置电子邮件格式。 The WordEditor property of the Inspector class returns an instance of the Document class which represents the message body. Inspector 类的WordEditor属性返回表示消息正文的 Document 类的实例。

You can read more about all these ways in the Chapter 17: Working with Item Bodies in MSDN.您可以在第 17 章:使用MSDN 中的项目主体中阅读有关所有这些方法的更多信息。

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

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