我试图在VBS脚本中添加消息而无法弄清楚,下面是我的脚本:
'email standard for CMG notification - ferhat
Dim myDateString, myStart, myMessage
myDateString = Date()
myStart = InputBox("CMG P47 complete Y/N")
if UCase(myStart) = "Y" then
myMessage = "CMG - P47 " & myDateString
elseif UCase(myStart) = "N" then
myMessage = "ATTN: CMG - P47 " & myDateString
else
MsgBox "Fer said: Thats not an answer!"
WScript.Quit
end if
Set outlookApp = CreateObject("Outlook.Application")
olMailItem = 0
Set newMessage = outlookApp.CreateItem(olMailItem)
newMessage.To = "ithelpdesk@test.com.au"
newMessage.Cc = "itoperations@test.com.au; operations@test.com.au"
newMessage.Subject = myMessage
newMessage.Display
我试图添加以下文字:
Hi,
Please note that P47 has been completed for today.
答案 0 :(得分:1)
使用.Body属性
newMessage.Body = "Hi, " & vbcrlf & vbcrlf & _
"Please note that P47 has been completed for today."
我在这个网站上找到了一些例子:http://www.slipstick.com/developer/create-a-new-message-using-vba/