0

私は 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.
4

1 に答える 1

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/

于 2013-08-25T05:48:40.860 に答える