R
Rasta
Hi,
I have some code posted below that used to work fine sending an email
message from Access. Now I am getting the error 'error -2147467259
(80004005) operation failed'. Any ideas what may be causing this?
code:
ShippingOutFile1 = "\\cafe2000\load\shipping.out"
ShippingOutFile2 = "\\cafe2000\load\bko.out"
ShippingOutFile3 = "\\cafe2000\load\invalid.out"
ShippingOutFile4 = "\\cafe2000\load\duplicates.out"
Dim objoutlook As Object
Dim objoutlookmsg As Object
Set objoutlook = CreateObject("Outlook.application")
Application.SetOption "Show Status Bar", True
If Not bvisbible = "" Then
Application.Visible = True
End If
Set objoutlookmsg = objoutlook.CreateItem(0)
With objoutlookmsg
.To = "(e-mail address removed)"
.Attachments.Add ShippingOutFile1
.Attachments.Add ShippingOutFile2
.Attachments.Add ShippingOutFile3
.Attachments.Add ShippingOutFile4
If bvisbible = "" Then
.Send
End If
End With
Set objoutlook = Nothing
Set objoutlookmsg = Nothing
I have some code posted below that used to work fine sending an email
message from Access. Now I am getting the error 'error -2147467259
(80004005) operation failed'. Any ideas what may be causing this?
code:
ShippingOutFile1 = "\\cafe2000\load\shipping.out"
ShippingOutFile2 = "\\cafe2000\load\bko.out"
ShippingOutFile3 = "\\cafe2000\load\invalid.out"
ShippingOutFile4 = "\\cafe2000\load\duplicates.out"
Dim objoutlook As Object
Dim objoutlookmsg As Object
Set objoutlook = CreateObject("Outlook.application")
Application.SetOption "Show Status Bar", True
If Not bvisbible = "" Then
Application.Visible = True
End If
Set objoutlookmsg = objoutlook.CreateItem(0)
With objoutlookmsg
.To = "(e-mail address removed)"
.Attachments.Add ShippingOutFile1
.Attachments.Add ShippingOutFile2
.Attachments.Add ShippingOutFile3
.Attachments.Add ShippingOutFile4
If bvisbible = "" Then
.Send
End If
End With
Set objoutlook = Nothing
Set objoutlookmsg = Nothing