473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

From Listbox to Word

Hi, Im using alistbox to insert names in a word document, im' using the following code but it only inserts the first name.


Code:
Dim strList1 As String
strList1 = PODERES.ListBox1.List(PODERES.ListBox1.ListIndex)
ActiveDocument.Bookmarks("p91").Range.Text = strList1


My question is, how can i do to insert ALL items in the listbox in word, the thing is i need them to be separated by comas and the last one by "and". Ex:
ITEM1, ITEM2, ITEM3 and ITEM4,

Of course, if theres only 1 item i need the "and" to be deleted. Ex:
ITEM1

THANK YOU VERY VEERY MUCH!!
Sep 3 '09 #1
0 1165

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Andy Weinmann | last post by:
I am trying to make a form in which i can view the ihe information for companies. I have a combobox which contains all of the work categories that the companies fit into. I have gotten the...
1
by: Seth Delaney | last post by:
I have a form with a combobox and a list box. The combobox will list records (names of queries) that are entered in a table called tblListName. I have the combobox set to get its values from this...
1
by: miron | last post by:
Hi! How to create horizontal scrollbar in listbox (vba). Help. Artur Mironczuk
1
by: Microskills | last post by:
I am a new VB.NET programmer. I am writing a dictionary program with a Dictionary file has over 60000 entries. When user starts typing a word in the searchbox, I want to show words that start with...
1
by: Microskills | last post by:
I am a new VB.NET programmer. I am writing a dictionary program with a Dictionary file has over 60000 entries. When user starts typing a word in the searchbox, I want to show words that start with...
2
by: Arnold | last post by:
Greetings Gurus, In a report showing the names of students and their progress, I am getting an error in the name field (Name: #Error). The report gets its data from an unbound form containing...
4
by: CrimeMaster | last post by:
HI I have an Exe file when it runs ,there are just two controls on the window.One is a ListBox and another is a Multi line Rich Edit control.When i click on an item in the list some text is...
14
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
8
by: jh | last post by:
I'd like to copy/paste into a listbox during runtime. I can do this for a textbox but can't figure out how to accomplish this for a listbox. Any help? Thanks.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.