- Wordファイル(画像と表を含む)を読みたい。
- その後、コンテンツを「RFC 822形式」に変換したいと思います。
上記のAPIとサンプルコードを探しています。
RFC 822は、あなたが探している仕様ではありません。
RFC 5322の要約は、次の1つの理由を明らかにしています。
This document specifies the Internet Message Format (IMF), a syntax
for text messages that are sent between computer users, within the
framework of "electronic mail" messages. This specification is a
revision of Request For Comments (RFC) 2822, which itself superseded
Request For Comments (RFC) 822, "Standard for the Format of ARPA
Internet Text Messages", updating it to reflect current practice and
incorporating incremental changes that were specified in other RFCs.
セクション1.1(「スコープ」)のこの段落は、別のことを明らかにしています。
This document specifies a syntax only for text messages. In
particular, it makes no provision for the transmission of images,
audio, or other sorts of structured data in electronic mail messages.
There are several extensions published, such as the MIME document
series ([RFC2045], [RFC2046], [RFC2049]), which describe mechanisms
for the transmission of such data through electronic mail, either by
extending the syntax provided here or by structuring such messages to
conform to this syntax. Those mechanisms are outside of the scope of
this specification.
私はあなたが実際に次のような別の質問への答えを望んでいると思います:
Wordメッセージをさまざまなメールユーザーエージェントで見栄えのするMIMEベースの形式に変換するにはどうすればよいですか?
私が間違っていて、Word文書をプレーンテキストの電子メールに変換する方法を本当に尋ねている場合は、Word文書をプレーンテキスト、PostScript、PDF、またはdocbookに変換するための非常に機能的なツールであるantiwordを検討する必要があります。(ただし、プレーンテキストを出力するときに画像で何でもできるという兆候はありませんが、とにかくです。)
Microsoft Office 用の Open XML SDK 2.0 から始めて、Word ファイルを読み取ります。