Dave Lett said:
Hi scorpion53061,
Okay, now we're getting somewhere.
You have a total of 3 tables in your header, correct?
In table 1, what cell do you want to modify? How do you want to modify it?
In table 2, what cell do you want to modify? How do you want to modify it?
In table 3, what cell do you want to modify? How do you want to modify it?
Can you bookmark the text in these cells (if so, this might make the code a
lot easier for you to read/write)?
Table 1 has 25 cells (13 rows) with 2 columns each needing their own text. I
want to address cell alignemnt, text, font and in one case color.
In one row the cells get merged.
Table 2 has 6 cells with 2 rows and 3 columns.Again the same I want to
modify. I get in trouble here when I name it Table(2) because it says the
"member of the collection does not exist"
I am unsure on bookmarking. I am pretty understanding of how the cell
numbering is working I think. But I will show what i have so far. I dont
have table 2 here yet.
Again thank you.
Dim myrange As Word.Range
myrange = oDoc.Content.Application.Selection.Range
oDoc.Content.Application.Selection.Tables.Add(Range:=myrange,
NumRows:=6, NumColumns:=2, DefaultTableBehavior:=wdWord9TableBehavior,
AutoFitBehavior:= _
wdAutoFitFixed)
oDoc.Content.Application.Selection.Tables.Item(1).Cell(3, 1).Range.Select()
With oDoc.Content.Application.Selection.Font
.Name = "Arial"
.Size = 18
.Bold = False
.Italic = False
End With
With oDoc.Content.Application.Selection.Tables.Item(1).Cell(3,
1)
.Range.Text = "A Division of Superior Electrical Supply
Inc."
.Row.Alignment = 0
.VerticalAlignment = 3
End With
oDoc.Content.Application.Selection.Tables.Item(1).Cell(3,
1).Range.Text = "JJ Koepsell Company"
oDoc.Content.Application.Selection.Tables.Item(1).Cell(3,
2).Range.Select()
With oDoc.Content.Application.Selection.Font
.Name = "Arial Black"
.Size = 28
.Bold = False
.Italic = False
.Color = 3355443 'wdColorGray80
End With
oDoc.Content.Application.Selection.Tables.Item(1).Cell(3,
2).Range.Text = "Order Report"
oDoc.Content.Application.Selection.Tables.Item(1).Cell(4,
1).Range.Select()
With oDoc.Content.Application.Selection.Font
.Name = "Arial"
.Size = 10
.Bold = False
.Italic = False
End With
With oDoc.Content.Application.Selection.Tables.Item(1).Cell(4,
1)
.Range.Text = "A Division of Superior Electrical Supply
Inc."
.Row.Alignment = 0
.VerticalAlignment = 0
End With
oDoc.Content.Application.Selection.Tables.Item(1).Cell(6,
1).Range.Select()
With oDoc.Content.Application.Selection.Font
.Name = "Arial"
.Size = 10
.Bold = False
.Italic = False
End With
With oDoc.Content.Application.Selection.Tables.Item(1).Cell(6,
1)
.Range.Text = "1010 S. Ninth Street"
End With