【发布时间】:2012-06-07 18:19:39
【问题描述】:
我正在尝试自动化一个邮件系统,在该系统中,编辑后的 Word 文档将通过 Lotus Notes 邮寄给许多人。
我正在使用以下代码来执行此操作。此代码运行良好,只是在作为邮件发送时会丢失所有格式(例如粗体、斜体、段落等)。
Set objRange = ob_doc.Content
mailtext = ob_word.CleanString(objRange.Text)
'Create the mail document
Set notesDocument = notesDatabase.CreateDocument
'set to memo format
notesDocument.Form = "Memo"
'Set the subject
notesDocument.Subject = subject
'Set the body
Set notesRichTextItem = notesDocument.CreateRichTextItem("Body")
notesRichTextItem.AppendText(mailtext)
... 在做了一些研究之后,我尝试将 word doc 转换为 html 以保持格式不变,但我无法将该 html 文件作为邮件正文邮寄。
【问题讨论】:
标签: html vbscript ms-word formatting lotus-notes