Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook call from Excel failed after upgrade

Status
Not open for further replies.

SimonPGreen

IS-IT--Management
Mar 8, 2004
116
GB
Hi,

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
 
The procedure stops at the send method
Any chance you could post the error message ?
You may have to resolve the address.
What happens if you call .Display instead of .Send ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top