excel - 如何将电子邮件保存为 html,包括 colorshememapping.xml、filelist.xml 和 themedata.thmx 文件?
问题描述
我需要将电子邮件列表“另存为”到 html,包括 colorshememapping.xml、filelist.xml 和 themedata.thmx 文件?
如果我从 Outlook 手动将“另存为”html 到指定的共享文件夹,则会在“电子邮件主题.htm”之上创建带有 3 个文件(colorshememapping.xml、filelist.xml 和 themedata.thmx)的单独文件夹.
上述手动步骤与 Excel VBA 中的以下宏不同,后者只是将 .msg 更改为 .htm。
如何将电子邮件列表另存为 htm 格式,就像我在 Outlook 中手动完成的一样。
还有另一个限制。Application.ActiveInspector
由于公司设置的安全性,我无法使用。
Sub Chgext()
ThisWorkbook.Activate
Sheets("RM response").Select
strSourceDirectory = Range("B1").Value
strSourceFile = Dir(strSourceDirectory & "*.msg")
Do While strSourceFile <> ""
Name strSourceDirectory & strSourceFile As strSourceDirectory &
Replace$(strSourceFile, ".msg", ".htm")
c = c + 1
strSourceFile = Dir()
Loop
End Sub