Dr@gonfly
10-10-2008, 12:19 PM
I've read through a lot of information about the text within a table wrapping but I am trying to modify the item you change on a table by going to Table/TableProperties. It's at the very bottom and you can choose None or Around. I have a document with tables in the footers which are set to Around and I would like them to be all None. Unfortunately, working with unlinked footers has become an occupational bullet point for me. here's what I am working with:
Sub ChangeWrapText ()
Dim oTable as Table
Dim oSection as Section
Dim oFooter as HeaderFooter
For each oSection In ActiveDocument.Sections
For each oFooter In oSection.Footers
oTable.rows.wraparoundtext=False
Next oFooter
Next oSection
End Sub
But it's saying Run-time error '91': Object variable or With block variable not set? I've tried putting in a With statement but the same error occurs, I don't get it... Does someone see something I don't?
When I use the macro recorder in the main story of the word document and record the action I am trying to replicate it gives me:
Selection.Tables (1).Rows.Wraparoundtext = false
Thank you!
Sub ChangeWrapText ()
Dim oTable as Table
Dim oSection as Section
Dim oFooter as HeaderFooter
For each oSection In ActiveDocument.Sections
For each oFooter In oSection.Footers
oTable.rows.wraparoundtext=False
Next oFooter
Next oSection
End Sub
But it's saying Run-time error '91': Object variable or With block variable not set? I've tried putting in a With statement but the same error occurs, I don't get it... Does someone see something I don't?
When I use the macro recorder in the main story of the word document and record the action I am trying to replicate it gives me:
Selection.Tables (1).Rows.Wraparoundtext = false
Thank you!