Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Atlanta, Georgia, USA
    Posts
    274
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Building an array (Access97/2000)

    I'm trying to send to multiple email addresses in Lotus notes from Access
    I'm told I need to use an array from what I have read on the Lotus site .
    If I type in Array("john.doe@anyaddress.com", "jane.doe@anyaddress.com") in the code
    the email sends to both addresses without any problem.
    If I create a string from a multiselect listbox and pass the value to the lotus routine using
    "Array ( " & strList & ")"
    strList contains "john.doe@anyaddress.com", "jane.doe@anyaddress.com"
    I get the following email error
    User array (array@anyaddress.com) not listed in public Name & Address Book
    I'm not to familiar with arrays and not sure if you can create them this way.
    Can someone help me in creating it/
    Thanks,
    Scott

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Building an array (Access97/2000)

    Do you need to change the line:
    "Array ( " & strList & ")"
    to:
    Array (strList)

    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Building an array (Access97/2000)

    If you're doing it in Access 2000, you can use the Split function to take strList and convert it to a single dimension array. Split wasn't introduced until A2k, so you can't do it that way in A97.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Atlanta, Georgia, USA
    Posts
    274
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Building an array (Access97/2000)

    Thanks Charlotte,
    The split function did the trick. I have some users of Access97 and I was able to find this split
    function on the Lotus web site. It works in Access97
    Here it is for anyone interested.


    Function Split(splitstr As String, delim As String, includeempties As Variant) As Variant
    Dim words() As String
    Dim holder As String
    Dim x As Integer
    Dim counter As Integer
    Dim laststop As Integer
    On Error GoTo errorhandler
    ReDim words(0) As String
    laststop = 1
    For x = 0 To (Len(splitstr) - 1)
    holder = Mid$(splitstr, x + 1, 1)
    If (x <> 0) Then
    If (Mid$(splitstr, x, 1) = delim) Then
    If (includeempties = False) Then
    laststop = x + 1
    GoTo getnext
    End If
    End If
    ElseIf ((x = 0) And (holder = delim)) Then
    If (includeempties = False) Then
    laststop = x + 1
    GoTo getnext
    End If
    End If
    If (x = Len(splitstr) - 1) Then
    If (holder = delim) Then
    words(UBound(words)) = Mid$(splitstr, laststop, (x + 1) - laststop)
    laststop = x + 2
    ReDim Preserve words(UBound(words) + 1) As String
    Else
    words(UBound(words)) = Mid$(splitstr, laststop, (x + 2) - laststop)
    laststop = x + 2
    ReDim Preserve words(UBound(words) + 1) As String
    End If
    Else
    If (holder = delim) Then
    If (x <> Len(splitstr) - 1) Then
    words(UBound(words)) = Mid$(splitstr, laststop, (x + 1) - laststop)
    laststop = x + 2
    Else
    words(UBound(words)) = Mid$(splitstr, laststop, x - (laststop - 1))
    End If
    ReDim Preserve words(UBound(words) + 1) As String
    End If
    End If
    getnext:
    Next x
    If (UBound(words) > 0) Then
    ReDim Preserve words(UBound(words) - 1) As String
    Else
    words(0) = ""
    End If
    Split = words
    Exit Function
    errorhandler:
    words(0) = ""
    Split = words
    Exit Function
    End Function

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    Duesseldorf, Germany
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Building an array (Access97/2000)

    Hi Scott
    I would be interested how the communication works between Access and Notes. I can create an E-mail from access, but it has to be sent by hand and I want to attach a file, whose name comes from a table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •