You still have to do all the other things your current code does.
I would guess the error is on the line
MailDoc.Body = .Column(0, intIndex) & .Column(1, intIndex)
and that you haven't done the bit where you set the MailDoc variable, i he
error isn't there come back to me.
--
Terry Kreft
"Rups" <ru**********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi Terry,
I have tried using the code below but it gives an error as below.
91:Object variable or With block variable not set.
Please could you advise.
Regards
Rupam
Terry Kreft wrote:
Something like
Dim intIndex As Integer
With Me.ListBox225
For intIndex = 0 To .ListCount - 1
If .Selected(intIndex) Then
' do the stuff you're doing with 1 e-mail in here e.g.
MailDoc.Body = .Column(0, intIndex) & .Column(1, intIndex)
End If
Next
End With
--
Terry Kreft
"Rups" <ru**********@gmail.comwrote in message
news:11**********************@n13g2000cwa.googlegr oups.com...
I am using Ms Access to send email automatically through Lotus Notes.
What I require now is that I have a List Box in my form which when
loads,fills in the data's from the backend table.
In the body of the mail,I use the object that contains the item
selected from the list.
i.e. MailDoc.Body=ListBox225.Column(0) & List225.Column(1)
When an email is generated,it output is as below.
>
126 Rupam.
>
Now I want a syntax code that would include multiple rows from the
list
box and not just 1 row.
>
Please can you help me with this I am in desparate need of it.
>
Your help much appreciated.
>
Regards
Rupam.
>