Tom,
If you are using automation, the Document you are working with has a Tables
collection under it. A Table Object has an Add Method for creating Tables. Under
the Table Object there are other collections including the Cell Object which you
can reference and fill with content. Here is some air code that should work or
at least point you in the right direction:
==============================
Function MakeWordTable(stDocument As String, stNewDocument As String)
Dim objWord As Word.Application
Dim objWordDoc As Word.Document
Dim objTable As Word.Table
Dim objRange As Word.Range
Dim x As Integer, y As Integer
Set objWord = CreateObject("Word.Application")
Set objWordDoc = objWord.Documents.Open(stDocument)
objRange = objWordDoc.Goto(wdGoToBookmark, , , "Bookmark1")
Set objTable = objWordDoc.Tables.Add(objRange, 3, 5)
For x = 1 To 3
For y = 1 To 5
objTable.Cell(x, y).Range.InsertAfter "Cell " & x & "," & y
Next y
Next x
objWordDoc.SaveAs stNewDocument
objWordDoc.Close
objWord.Quit
Set objTable = Nothing
Set objRange = Nothing
Set objWordDoc = Nothing
Set objWord = Nothing
End Function
==============================
Bri
Tom Dauria wrote:
What I am trying to do is write a resume into a word document from
information in an Access database. I have been using bookmarks and
inserting table results into the document and so far it's working but
I have run into a problem.
The final section of the resume deals with Experience which is
subgrouped by Market Segments and then experience.
What I want it to look like is
Experience (this should be 14pt font)
Biotechnology (this should be 12pt font)
now I need to insert a table with 3 columns Position, Client/Location
and Project. The table will be in 10pt font.
As I loop through the user's experience I will need to break out of
the table drop down a line so that I can start another market segement
ie Chemical Engineering etc and then build a table for each section.
Any suggestions?