I have now successfully converted an SBL script which we currently use to Email BO documents via Exchange from a DAS. The main bulk of the conversion was to convert Outlook calls to MAPI calls (which uses the CDO object Model), necessary as BCA can only run as an NT Service (which is incompatible with Outlook calls). From the conversion I have a macro called ‘Main’, which when run works the same as running the unconverted SBL script on a version 4 client. Having said this the mail does not show the attachments in line with the Email Body… However that’s another story or question.
Now, when I send the test document, “Test.rep” with the Action to run the Custom Macro “Test.rep!Main” (Macro “Main” being selected from the Active Document) I receive the following message:
“You selected a macro which is not part of the active document. If the document in which the macro is located is not open on the server machine, the task will fail. You should include the macro in your active document before sending. Do you still want to submit the document?”
I don’t understand this, since I did select Macro “Main” from the Active document. Have I missed something here? What could I be doing wrong here?
I don’t understand this, since I did select Macro “Main” from the Active document. Have I missed something here? What could I be doing wrong here?
Not sure, I have no problems submitting jobs with macros (both converted and newly created). What release are you using - we have 5.01 and we don’t have problems - but we could never get 5.0 to work properly.
Having said this the mail does not show the attachments in line with the
Email Body
Not quite sure what you mean by this - but we use the following piece of code :
’ Add a CRLF to the body text so the attachments appear on the next line
objMessage.Text = objMessage.Text & vbCRLF Set objAttachment = .Attachments.Add
With objAttachment
.Type = 1
.Name = “Filename” ’ the name you want
to appear in the message
.ReadFromFile sFileName ’ where sFilename contains
the full path to the file
’ This will position the attachment 1 character past the end of the body text
.Position = Len(objMessage.Text) + 1
End With
If you add more attachments increment the .Position bt 1 for each file.
Did you save your document after including the macro in it?
Walter
“Williams, Daniel John (Daniel)” wrote:
I have now successfully converted an SBL script which we currently use to Email BO documents via Exchange from a DAS. The main bulk of the conversion was to convert Outlook calls to MAPI calls (which uses the CDO object Model), necessary as BCA can only run as an NT Service (which is incompatible with Outlook calls). From the conversion I have a macro called ‘Main’, which when run works the same as running the unconverted SBL script on a version 4 client. Having said this the mail does not show the attachments in line with the Email Body… However that’s another story or question.
Now, when I send the test document, “Test.rep” with the Action to run the Custom Macro “Test.rep!Main” (Macro “Main” being selected from the Active Document) I receive the following message:
“You selected a macro which is not part of the active document. If the document in which the macro is located is not open on the server machine, the task will fail. You should include the macro in your active document before sending. Do you still want to submit the document?”
I don’t understand this, since I did select Macro “Main” from the Active document. Have I missed something here? What could I be doing wrong here?
Did you save your document after including the macro in it?
Walter
Yes I did. I’m really confused about this. I think I must be doing something stupid, or have a lack of understanding here as no one else on the list has brought up a problem here.
Not sure, I have no problems submitting jobs with macros (both converted
and
newly created). What release are you using - we have 5.01 and we don’t
have
problems - but we could never get 5.0 to work properly.
The BCA was on version 5.0.1, but the client I was using to schedule the document from wasn’t, so I upgraded it to 5.0.1. This did not resolve the problem.
Other, things that I have tried have been moving the Macro from the Module to the code section under the Document. This didn’t seem to work either.
I have logged a call with BO Tech support. I shall let you know if they mention something revealing. I shall probably keep quiet if I’m just missed something obvious :).