这可能吗?我希望预先填充To:,Body和Attachment,这样用户所要做的就是点击发送。谢谢!
答案 0 :(得分:43)
打开新邮件(ipm.note
是电子邮件的message class)
outlook.exe /c ipm.note
打开新邮件并填充发件人:
outlook.exe /c ipm.note /m someone@microsoft.com
打开包含附件的新邮件:
outlook.exe /c ipm.note /a filename
组合:(下面的第一个在Office 2016中没有用,第二个没有用)
outlook.exe /c ipm.note /m someone@microsoft.com&subject=test%20subject&body=test%20body
outlook.exe /c ipm.note /m "someone@microsoft.com&subject=test%20subject&body=test%20body"
%20必须用于产生空白。
答案 1 :(得分:9)
如果只是在/m
示例:
outlook.exe /c ipm.note /m "someone@microsoft.com&subject=test%20subject&body=test%20body" /a test.txt
答案 2 :(得分:3)
VonC的解决方案有效,但正如skbergam的评论中所述,它不允许附件。
如果像我一样,这是一个大问题,那么下面的WSH代码就可以了。
Set olApp = CreateObject("Outlook.Application")
Set olMsg = olApp.CreateItem(0)
With olMsg
.To = "test@testing.com"
'.CC = "cc@testing.com"
'.BCC = "bcc@testing.com"
.Subject = "Subject"
.Body = "Body"
.Attachments.Add "C:\path\to\attachment\test.txt"
.Display
End With
我用Outlook2003尝试过它