Does anyone have a script to send e-mails through DAS? We have a script that runs various reports using different parameters and saves them in html format. After the reports are generated we need to send them to external customers automatically. List of users is stored in a table. Any idea how this can be accomplished?
See the attached script that I use to check every morning if the DAS is running. It simply refreshes a small doc and sends me an email upon completion. Hope this can give you ideas
Pierrot
Does anyone have a script to send e-mails through DAS? We have a script that runs various reports using different parameters and saves them in html format. After the reports are generated we need to send them to external customers automatically. List of users is stored in a table. Any idea how this can be accomplished?
–
=====================1003252==
Sub SendMail (strSubj as String,strMsg as String)
Dim OlkApp as Object 'Outlook.Application Dim NewMail as Object 'MailItem
Set OlkApp = CreateObject(“Outlook.Application”) Set NewMail = OlkApp.CreateItem(olMailItem) With NewMail
.To = “pher@royal.net”
.Subject = strSubj
.Body = strMsg
.Importance = 2
.Send
End With
End Sub
Sub Main
dim strMsg as String
dim strSubj as String
dim doc as BODocument
on Error resume next
set doc = ActiveDocument
doc.Refresh
if Err then
strSubj = “DAS Error”
strMsg = "DAS status : Error " & Err & ": " & Error$ else
strSubj = “DAS OK”
strMsg = “DAS status : OK”
end if
Call SendMail(strSubj,strMsg)
End Sub