呼叫outlook傳送Sub automail()Dim OutlookApp As ObjectDim MailItem As Object Set OutlookApp = CreateObject("Outlook.Application") Set MailItem = OutlookApp.CreateItem(0) MailItem.To = Range("B1") "收件人 MailItem.CC = Range("C1") "抄送 MailItem.Subject = Range("E1") "主題名 MailItem.Body = Range("F1") "正文 MailItem.Send Set OutlookApp = Nothing Set MailItem = NothingEnd Sub
呼叫outlook傳送Sub automail()Dim OutlookApp As ObjectDim MailItem As Object Set OutlookApp = CreateObject("Outlook.Application") Set MailItem = OutlookApp.CreateItem(0) MailItem.To = Range("B1") "收件人 MailItem.CC = Range("C1") "抄送 MailItem.Subject = Range("E1") "主題名 MailItem.Body = Range("F1") "正文 MailItem.Send Set OutlookApp = Nothing Set MailItem = NothingEnd Sub