Solved

send info from list box to a mail merge document

Posted on 2000-03-23
2
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Protecting vb6 & .Net code Obfuscation 18 184
Help me. 3 71
IF ELSE Statement in Excel Macro VBA 16 87
RUNRMTCMD from AS/400 13 101
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

730 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