473,396 Members | 2,093 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,396 software developers and data experts.

Listbox to Word Document

30
Hi Guys,

I am half way through a program and have hit a bit of a wall, I am putting variables from a program (labels and text boxes) into a word document template, So far i have been putting the variables into the document by using this code:

Expand|Select|Wrap|Line Numbers
  1. thisDoc.Content.Find.Execute(FindText"<<TITLECOUNT, ReplaceWith:=lblcomputername.Text, Replace:=Word.WdReplace.wdReplaceOne)
The problem i have is that i need to now grab every line of a listbox and put it into a certain place in the same document template. I want every line in the listbox to be a seperate line in the document, can any one help me out

Kind Regards

James Twyman
Jan 23 '09 #1
1 1583
nukefusion
221 Expert 100+
Is there any reason why you can't just loop through the listbox items and create a single string, adding a new line character after each item?
You could then use the same method to insert that into the Word document.
Jan 26 '09 #2

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

Similar topics

2
by: James Goodman | last post by:
I have a listbox named sub1 on an asp page. I need to fill this list with values from a table. These are selected based upon the selection of a value/s in another listbox. It was suggested that I...
7
by: Eddy Scheire | last post by:
Hi all, I've got this listbox and this text field on an ASP page. Now I want the item I click on in the listbox to appear in the text field and I can't find the code nowhere for what seems to me...
5
by: Eddie Clark | last post by:
I'm trying to access the items in a listbox from a client-side vb script. <asp:listbox id="ListBox1" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 120px" runat="server" Width="400px"...
0
by: deepak | last post by:
Hi all, i m transefering values from one listbox to another listbox using javascript(both are html controls), the first listbox is populating with database at page_load time and the second listbox...
7
by: mikeh3275 | last post by:
I'm creating a .net program that uploads images to the FTP server. A blank listbox is populated dynamically on the client side from the value of the html input file widget. There is also a...
1
by: divya | last post by:
Hello, I used the below code to move selected items between two listboxes Left and Right:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPopup.aspx.cs" Inherits="TestPopup" %> ...
5
by: Sunny | last post by:
Hi, How I can move to the first value in Listbox. I have a listbox that has some values. When I select any value from it. It opens a div with the info about that value. But when I click on...
0
by: esperanto234 | last post by:
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 =...
6
by: esperanto234 | last post by:
Hi, Im using alistbox to insert names in a word document, im' using the following code but it only inserts the first ITEM on the list. Code: Dim strList1 As String strList1 =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.