Hello listers,
I urgently need your help. We upgraded to BO 5 this week and I cannot get the converted scipts to run on the BCA.
Below is a very simple example that just sends a mail, nothing more. When running the script on a local PC it works ok. When running it in a normal BO session on the NT Server where BCA is installed it works ok.
But when sending it to the BCA it always fails with: “(303) Error with no ErrorHandler with BreakOnVBAError = False” message on the BCA.
Is there something wrong with the script? We are using BO5.0.2 on NT4 with Exchange 5.0 for NT
Thanks in advance,
Mathias
BP Amoco Germany
This is the script:
Attribute VB_Name = “nur_Mail”
Option Explicit
Sub nur_Mail()
Dim dummy As String
dummy = SendMail()
End Sub
Function SendMail()
Dim objSession As Object
Dim objMessage As Object
Dim objRecipient As Object
Set objSession = CreateObject(“mapi.session”) objSession.Logon profileName:=“das mail” Set objMessage = objSession.Outbox.Messages.Add objMessage.subject = "Test mail from BCA: " objMessage.text = "Test mail from BCA: " Set objRecipient = objMessage.Recipients.Add
objRecipient.Name = “heinemm@bp.com”
objRecipient.Type = 1 '1=to, 2=cc, 3=bcc
objRecipient.Resolve
objMessage.Update 'updates the object to display the
filename
objMessage.Send 'Send the message
objSession.Logoff 'Logoff using the session object
SendMail = 0
End Function
I see that you are not using any error handling, (which is really what BCA is telling you) so it could have picked up a problem on any one of the statements.
Check your MAPI profile name - it should match the profile name on the Control Panel/Mail and Fax.
NB! To check this, log on to the BCA machine with the NT userid/password that the BCA services start with. The MAPI Profiles are created seperately for each userid.
Have you tried stopping BCA, opening the document in the Reporter module and stepping through the script? (If you don’t stop BCA it may just shut down the reporter as you are working with it). Again, Log-on with the userid/password that BCA uses.
You may find that your VBA script references objects not available to the BCA userid on the BCA machine.
Try opening the script and check the references being used - Click on Tools/References - if you see something which says: “Deleted: …” then you will need to resolve those before the script will run.
I copied your script into BO 5.02/VBA on my setup - but it complains about your “Attribute” statement. I commented it out and changed the MAPI Profile name and it works OK.
Kevin Charleston
SA Container Depots
Cape Town, South Africa
I urgently need your help. We upgraded to BO 5 this week and I
cannot get
the converted scipts to run on the BCA. Below is a very simple example that just sends a mail, nothing more. When running the script on a local PC it works ok. When running it in a normal BO session on the NT Server where BCA is installed it works ok.
But when sending it to the BCA it always fails with: “(303) Error with no ErrorHandler with BreakOnVBAError = False” message on the BCA.
I see that you are not using any error handling, (which is really what BCA is telling you) so it could have picked up a problem on any one of the statements.
Do you have an expample how to do that?
Check your MAPI profile name - it should match the profile name on the Control Panel/Mail and Fax.
It’s there.
Have you tried stopping BCA, opening the document in the Reporter module and
stepping through the script? (If you don’t stop BCA it may just shut down the reporter as you are working with it). Again, Log-on with the userid/password that BCA uses.
Yes from there it is running ok.
You may find that your VBA script references objects not available to the BCA userid on the BCA machine.Try opening the script and check the references being used - Click on
Tools/References - if you see something which says: “Deleted: …” then you
will need to resolve those before the script will run.
nothing “deleted…” . Ticked are: VB for Applications,BO5.0 object
Library, OLE Automation and MS Forms 2.0 Objret Library.
I copied your script into BO 5.02/VBA on my setup - but it complains about your “Attribute” statement. I commented it out and changed the MAPI Profile
name and it works OK.
the Attribute statement was added by VBA when doing an “Export File” to
.bas
Did you run it through the BCA?
Kevin Charleston
SA Container Depots
Cape Town, South Africa
Thanks for your suggestions. Do you have any other ideas?
Mathias
I urgently need your help. We upgraded to BO 5 this week and I
cannot get
the converted scipts to run on the BCA. Below is a very simple example that just sends a mail, nothing more. When running the script on a local PC it works ok. When running it in a normal BO session on the NT Server where BCA is installed it works ok.
But when sending it to the BCA it always fails with: “(303) Error with no ErrorHandler with BreakOnVBAError = False” message
on
the BCA.
Hello listers,
I urgently need your help. We upgraded to BO 5 this week and I cannot get the converted scipts to run on the BCA.
Below is a very simple example that just sends a mail, nothing more. When running the script on a local PC it works ok. When running it in a normal BO session on the NT Server where BCA is installed it works ok.
But when sending it to the BCA it always fails with: “(303) Error with no ErrorHandler with BreakOnVBAError = False” message on the BCA.
Is there something wrong with the script? We are using BO5.0.2 on NT4 with Exchange 5.0 for NT
Thanks in advance,
Mathias
BP Amoco Germany
w
This is the script:
Attribute VB_Name = “nur_Mail”
Option Explicit
Sub nur_Mail()
Dim dummy As String
dummy = SendMail()
End Sub
Function SendMail()
Dim objSession As Object
Dim objMessage As Object
Dim objRecipient As Object
Set objSession = CreateObject(“mapi.session”) objSession.Logon profileName:=“das mail” Set objMessage = objSession.Outbox.Messages.Add objMessage.subject = "Test mail from BCA: " objMessage.text = "Test mail from BCA: " Set objRecipient = objMessage.Recipients.Add
objRecipient.Name = “heinemm@bp.com”
objRecipient.Type = 1 '1=to, 2=cc, 3=bcc
objRecipient.Resolve
objMessage.Update 'updates the object to display the
filename
objMessage.Send 'Send the message
objSession.Logoff 'Logoff using the session object
SendMail = 0
End Function