Hi, I have an windows application that "can" log entries into a word
document for printing or storing...
each log entry is supposed to look like this:
Text
----------------------------------
Quote:
Table 1 | Columns |
----------------------------------
Info | Info |
----------------------------------
|
Text
----------------------------------
Quote:
Table 2 | Columns |
----------------------------------
Info | Info |
----------------------------------
Info | Info |
----------------------------------
|
Separator
But only ends up displaying from the Table 2 down, so
----------------------------------
Quote:
Table 2 | Columns |
----------------------------------
Info | Info |
----------------------------------
Info | Info |
----------------------------------
|
Text
Separator
Here is an abregged version of the code:
Dim oWord As New Word.Application
Dim oDoc As New Word.Document
oDoc = oWord.Documents.Add()
With oDoc.Range
.InsertAfter("Text")
.InsertParagraphAfter()
With .Tables.Add(oDoc.Range, 2, 4)
.Cell(1, 1).Column.Width = oWord.CentimetersToPoints(9.21)
'etc... other columns
.Cell(1, 1).Range.Text = "Dernière tâche"
'etc...other cells
End With
.InsertAfter("Text")
.InsertParagraphAfter()
With .Tables.Add(oDoc.Range, 3, 4)
.Cell(1, 1).Column.Width = oWord.CentimetersToPoints(2.54)
'etc... all columns
.Cell(1, 1).Range.Text = "Usager"
'etc... all cells
End With
..InsertAfter("------------------------------------------------------")
..InsertParagraphAfter()
End With
What is causing only the second table to show, and what should I do to fix
it?