Is there a way to Export reports through Outlook with out Outlook being open. This is a VB Script program running through WScript. The program reads a SQL file and gets the parameters for ExportOptions.MailCcList, ExportOptions.MailMessage, ExportOptions.MailSubject, and ExportOptions.MailToList and these work fine as long as you keep Mail open. Is there a Parameter I can use to open or set the Mail Profile. Any Sugestions. I set the fields in the code below.
Code:
Set ExportOptions = crReport.ExportOptions
If ExD = 2 then
' wscript.echo ExF,ExFN
ExportOptions.FormatType = Cint(ExF)
'Format Type
ExportOptions.DiskFileName = ExFN
' Disk File Name
ExportOptions.DestinationType = Cint(ExD)
' Destination type '2 'crEDTEMailMAPI
crReport.ExportOptions.MailCcList = txtCCList
crReport.ExportOptions.MailMessage = txtMessage
crReport.ExportOptions.MailSubject = txtSubject
crReport.ExportOptions.MailToList = txtToList
End If
' Export the report and set the export prompting parameter to false