SimonPGreen
IS-IT--Management
Hi,
We've movd our Office to 2003 and a VBA procedure we used now seems to fail
The procedure stops at the send method
We have added the reference to Outlook11 and tried various macro security settings but all to no avail.
Any ideas?
Regards
Simon Green
We've movd our Office to 2003 and a VBA procedure we used now seems to fail
Code:
Select Case resp
Case Is = vbYes
Application.StatusBar = "Creating mail message and saving file " & fname & "."
Set OutlookApp = CreateObject("Outlook.Application")
With OutlookApp.createitem(olMailItem)
.Subject = "Requisition issued for assignment of job card number."
.Body = "Requisition " & reqno & " created on " & Now & " is in the requisitions folder." & vbCr & vbCr _
& "Click on the link below to open this file and assign a Jobcard number." & vbCr & vbCr _
& "\\domain_server\contracts\factory\reqs\" & fname
.to = "Hayley Munt"
.Save
.send
End With
With OutlookApp.createitem(olJournalItem)
.Subject = "Requisition " & ConName & reqno & " issued" & Now & "."
.Start = Now
.Save
End With
With ActiveWorkbook
.SaveAs "\\domain_server\contracts\factory\reqs\" & fname
.Close
End With
MsgBox prompt:="Email sent and journal entry added." & vbCr _
& "File saved to Requisitions folder on Domain_server.", _
Title:="Operation completed"
Case Is = vbNo
MsgBox prompt:="Operation cancelled"
End Select
Application.StatusBar = False
The procedure stops at the send method
We have added the reference to Outlook11 and tried various macro security settings but all to no avail.
Any ideas?
Regards
Simon Green