Word文档作为电子邮件正文,需要格式为单词 [英] Word Document as email body ,need format as word

查看:145
本文介绍了Word文档作为电子邮件正文,需要格式为单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将包含word文档的文本,图像和格式的整个文档作为电子邮件正文。



我这样做,只提供word文档中的Text格式也改变了。



 Word.Document wordDoc = wordApp.Documents.Open(filename, ref  oMissing, ref  oTrue, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing, ref  oMissing); 
Word.Range range = wordDoc.Content;
range.Select();
string msg = range.Text;
message.IsBodyHtml = true ;
message.Body = msg;
wordDoc.Close( ref oMissing, ref oMissing, ref oMissing);



任何想法都可以实现这一点。建议我。

解决方案

< blockquote>检查这些...

ASPNet-Send-email-with-Images-embedded-in-Rich-Text-HTML-body.aspx [ ^ ]

http://www.emailarchitect.net/easendmail/kb/csharp.aspx?cat= 8 [ ^ ]

c-sharp-sending-mails-with-images-inline-using-smtpclient [ ^ ]

发送的电子邮件与 - 图像嵌入图像不可见 [ ^ ]

如何-to-embed-multiple-images-in-email-body-using-net [ ^ ]

使用Microsoft Word文档作为消息正文并发送电子邮件 [ ^ ]


< blockquote>你不能制作word文档电子邮件正文。你只有2 + 1个选项:

- 纯文本

- html(受限制的css,没有javascript): http://www.thinksend.com/faq/design-restrictions [ ^ ]

- TNEF(当您使用Outlook和Exchange发送RTF时使用此选项)。这将是你想要的最接近的,但请注意,这是一个非常特别的。阅读: http://en.wikipedia.org/wiki/Transport_Neutral_Encapsulation_Format [ ^ ]。我不确定如果没有交换服务器作为后端,你将能够使用这种格式。



你想要实现的是平台和供应商特定的,我建议你忘了这种方法:创建两个实体:纯文本和简单的html,只需将word文档添加为附件。


how can i make whole document with text,images and format of word document as email body.

I did this way, which gives only Text from word document and format is also changed.

Word.Document wordDoc = wordApp.Documents.Open(filename, ref oMissing, ref  oTrue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
                    Word.Range range = wordDoc.Content;
                    range.Select();
                    string msg = range.Text;
                    message.IsBodyHtml = true;
                    message.Body = msg;
                    wordDoc.Close(ref oMissing, ref oMissing, ref oMissing);


Any idea to achieve this.Kindly suggest me.

解决方案

Check these...
ASPNet-Send-email-with-Images-embedded-in-Rich-Text-HTML-body.aspx[^]
http://www.emailarchitect.net/easendmail/kb/csharp.aspx?cat=8[^]
c-sharp-sending-mails-with-images-inline-using-smtpclient[^]
Send-email-with-image-embedded-image-not-visible[^]
How-to-embed-multiple-images-in-email-body-using-net[^]
Using a Microsoft Word Document as the Message Body and Sending Email[^]


You can not make a word document email body. You have only 2+1 options:
- plain text
- html (restricted css, no javascript): http://www.thinksend.com/faq/design-restrictions[^]
- TNEF (this is used when you send RTF with Outlook and Exchange). This would be the nearest to what you desire, but be aware, that this is a really special one. Read this: http://en.wikipedia.org/wiki/Transport_Neutral_Encapsulation_Format[^]. I am not sure you will be able to use such format without having exchange server as backend.

As what you want to achieve is platform and vendor-specific, I suggest you forget this approach: create two bodies: plain text and simple html and simply add the word document as attachment.


这篇关于Word文档作为电子邮件正文,需要格式为单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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