S
sriddle68
I have a header that contains a table to which I want to put text into
each cell in the table.
I am having a problem writing to that table. When I run the code
snipit below I put in a table(1).select to be able to visually see
where table #1 is and where I should expect the text to show up. It
highlights my header table just fine but the next line puts "B123"
into a table in the body of the document not the header table.
How can I write specifically to the table in the header?
Thanks
Scott Riddle
Sub Macro4()
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.Tables(1).Select
ActiveDocument.Tables(1).Cell(1, 1).Range.Text = "B123"
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
each cell in the table.
I am having a problem writing to that table. When I run the code
snipit below I put in a table(1).select to be able to visually see
where table #1 is and where I should expect the text to show up. It
highlights my header table just fine but the next line puts "B123"
into a table in the body of the document not the header table.
How can I write specifically to the table in the header?
Thanks
Scott Riddle
Sub Macro4()
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.Tables(1).Select
ActiveDocument.Tables(1).Cell(1, 1).Range.Text = "B123"
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub