Solved

send info from list box to a mail merge document

Posted on 2000-03-23
2
188 Views
Last Modified: 2010-05-02
Okay, I'm learning.....

The mail merge works like a charm.  One more bit of functionality I need to add.  

I select a document from the combo box, the appropriate people show up.  The user selects any number of the records in ListBox1 to transfer to ListBox2.  

I need to send the mail merged form letter to all the selected records from ListBox2.

I understand that would be a For..Next Loop, but do I use the count property?  ListIndex?  I'm unclear and my syntax is breaking the form.  

Please help!!
-A
0
Comment
Question by:ambulance
2 Comments
 
LVL 1

Accepted Solution

by:
ndb earned 50 total points
ID: 2651253
Hi,

Try this:

For i = 0 to List1.ListCount - 1
  If List1.Selected(i) Then
    Debug.Print List1.List(i)
  End If
Next i

This will print each item that the user selected.
0
 

Author Comment

by:ambulance
ID: 2654088
Duh!  Why didn't I come up with that?!  
Harumph....

Thanks.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question