String limit?

Your data should be built on a table... either send blank tables with one or two rows filled in with data that produces the error, or just attach the database with blank tables and a way to reproduce the error.

Even if you send the database with no data, we may be able to look at your code and see how things flow... and see if the problem exists in the vb.
 
Okay. Would it just be easier for me to have the vb query the table based on the critieria and then create a string from the email addresses in the table, rather than pass them to a listbox and then create the string (and if so, how do you have vb find a value in a table or query rather than the listbox (i.e.: me.lbolistbox.item, but for a table or query))?

The problem with the error is that I can't get it to reproduce unless I have the data exactly as is. In fact, if I select certain email addresses along with other it produces the error, but not when I select them with different ones or by themselves. And there doesn't seem to be a pattern within the email addresses that are causing the problem (such as length, type of username, type of organization, etc).

I'm going to post the db without any data in it, and see if maybe someone can find something in my structure or code that looks like it might be creating the problem.

I apologize in advance, my code is not commented all that well. I'm still getting used to doing that. :)
 

Attachments

If the thing works for some email addresses and not for others then your code wouldn't be bad. Something is wrong with either how you're storing your data, or the actual data itself (meaning an invalid character, or break, or something similar). I will look into it a little later though.
 
Lotus won't accept long string

Okay. I think I have narrowed it down to a length problem. Lotus is fine having as many email addresses as I want in there, and when I try to pass the variable to a form's text box, I got a complete list of the email addresses. It is only once I pass it to the procedure and then onto Lotus that I have the limit imposed. Even once I pass the string to the procedure, and then ask the procedure to pass it to the form rather than to Lotus, I get the complete list.

I have done a series of five email addresses at a time, having each string open a new email in lotus and pass the value as the BCC line. I can copy and paste them all into one email from there without a problem.

So the issue seems to be one of lotus restricting incoming strings, or access restricting outgoing strings. Any thoughts? Anyone know where I can go to find out if this is the case and see how to work around the issue?

Thanks! :)
 
Solution!

Okay, after much reading and a little drawing of diagrams on some paper, I was able to set the list of email addresses to an array of email addresses, and pass the array to the bcc field, rather than passing a long string. Apparently Lotus reads the string as one email address, and has a restriction on the length of that email address (or so I've read, I have yet to find confirmation of this from IBM, but it works now, so I'm okay with that), so it requires that you pass an array of addresses to it's fields, which it automatically separates using commas.

When I get a chance later on this week I will post the code and the explanation in the Code Repository section for all to use. Much thanks to everyone who helped me find answers, raised questions and gave advice. I could not have finished this part of my project without you! :D
 
Last edited:
Please post your answer, I may not be using Lotus Notes now, but in the future I may need to work with it. I'm interested in learning more and am glad you found the problem (most people would just give up rather than understand it was a lotus issue).

Remember
Private Sub cmdSelectAll_Click()

Change this:
Code:
'selects all
    Dim i As Long
    
    For i = 0 To Me.lboNameList.ListCount - 1
        If Me.lboNameList.Selected(i) Then
        Else
            Me.lboNameList.Selected(i) = True
        End If
    Next
End Sub
To:
Code:
Private Sub cmdSelectAll_Click()
'selects all
    Dim i As Long
    
    For i = 0 To Me.lboNameList.ListCount - 1
        If Not Me.lboNameList.Selected(i) Then
            Me.lboNameList.Selected(i) = True
        End If
    Next
End Sub
 
Modest,
Special thanks to you for helping me work through, and for the advice on design work. I changed the code for the select all and have been going through the rest of my code and commenting it, and trying to reduce the volume using the guide from the select all that you posted.

I will definately post the lotus notes code and put a link to the posting here so anyone who searches and finds this thread can find the answer as well.

Thanks again! :)
 
Lotus email mutliple email addresses..

KeithIT..

I am actually using the piece of code you have posted in the forum, for sending emails via lotus notes.

I am facing the same problem as you do..When I try to send it to more than 5 email address, it is not sending it to all the addresses..It is sending it to only 2 addresses..

But when I set the edit to "True" as in the following statement..it opens up the lotus notes and with all the addresses in the To field..ready to send..

The problem is only when I want the email to be sent automatically by setting the edit to "FALSE"..

Call CreateMailandAttachFileAdr(IsSubject:=Sub1, SendToAdr:=Send1, CCToAdr:=CC1, BCCToAdr:=BCC1, IsBody:=Body1, Attach1:=At1, Attach2:=At2, edit:="FALSE")

Did you figure out what the problem was?

Thanks once again for your code..
 
Bosch, search the forum for this. If lotus notes is using the same SendObject as outlook, there was a thread posted on this topic before the forum had a security breach.
 

Users who are viewing this thread

Back
Top Bottom