Q:

From listbox to word table

I want to make a program witch put items from ListBox to word table.
How can I put items from listbox to word table? I have 10 listbox (1 for each coulom) so I need table with 10 coulom and 30 rows.
1 more question. Can I insert as header of this doc a text? for exemple -> Document number 21 as header.

A:

Add a reference to Microsoft.Office.Interop.Word to your project, it is under the Extensions tab:

This code will generate a document, create a table, and just populate the table with the string hello.  I assume that you know how to read data from your listboxes, so you should be able to easily adapt this code to do that:
Imports Word = Microsoft.Office.Interop.Word
Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim word As New Word.Application()
        word.Visible = True

        Dim doc = word.Documents.Add()
        Dim table = doc.ActiveWindow.Selection.Tables.Add(doc.ActiveWindow.Selection.Range, 30, 10)

        For i As Integer = 0 To 9
            table.Cell(i, i).Range.Text = "hello"
        Next
    End Sub
End Class

