469,150 Members | 1,975 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,150 developers. It's quick & easy.

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 1109

Post your reply

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

Similar topics

8 posts views Thread by Andy Weinmann | last post: by
1 post views Thread by Seth Delaney | last post: by
1 post views Thread by Microskills | last post: by
1 post views Thread by Microskills | last post: by
4 posts views Thread by CrimeMaster | last post: by
14 posts views Thread by Professor Yonce | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.