******************************************************
Dim ol,ns,newMessage,nl,myUser
Set ol = CreateObject("Outlook.Application"
Set ns = ol.GetNamespace("MAPI"
On Error Resume Next
ns.Logon "Microsoft Outlook Internet Settings"
if Err then
Err.Clear
Set ol = Nothing
Set ns = Nothing
Set ol = CreateObject("Outlook.Application"
Set ns = ol.GetNamespace("MAPI"
myUser = ns.CurrentUser.Name
End if
On Error GoTo 0
nl = Chr(10)
myBody = "Multi-Layer Ship Log for " & rundate
Set newMessage = ol.CreateItem(olMailItem)
With newMessage
.Subject ="TEST Transmittal" & rundate & " Exception report also"
.Body = myBody
.Recipients.Add("XXXX@XXXX.com".Type = olTo
.Send
End With
ns.Logoff
Set ol = Nothing
*********************************************************
This VBScript failed using with WSH requesting a transport
provider by outlook97 though suceeded with VBA in Excel97.
I need a solution for this.
Dim ol,ns,newMessage,nl,myUser
Set ol = CreateObject("Outlook.Application"
Set ns = ol.GetNamespace("MAPI"
On Error Resume Next
ns.Logon "Microsoft Outlook Internet Settings"
if Err then
Err.Clear
Set ol = Nothing
Set ns = Nothing
Set ol = CreateObject("Outlook.Application"
Set ns = ol.GetNamespace("MAPI"
myUser = ns.CurrentUser.Name
End if
On Error GoTo 0
nl = Chr(10)
myBody = "Multi-Layer Ship Log for " & rundate
Set newMessage = ol.CreateItem(olMailItem)
With newMessage
.Subject ="TEST Transmittal" & rundate & " Exception report also"
.Body = myBody
.Recipients.Add("XXXX@XXXX.com".Type = olTo
.Send
End With
ns.Logoff
Set ol = Nothing
*********************************************************
This VBScript failed using with WSH requesting a transport
provider by outlook97 though suceeded with VBA in Excel97.
I need a solution for this.