I
ion
I just found out that one of the abilities Word 2007 stripped me of
was that of putting a landscape formatted section in the middle of a
portrait document. I wrote a macro that will find the first table
following a selection and make it landscape. Enjoy!
Sub LandscapeFollowingTable()
Dim sec As Word.Section, rng As Word.Range
Set rng = Selection.Range
'find the next table -- I'd find the enclosing table if I could
Set rng = rng.Next(wdTable, 1)
'create a section break before the table
Set sec = ActiveDocument.Sections.Add(rng, wdSectionContinuous)
'create a section break after the table
ActiveDocument.Sections.Add rng.Next, wdSectionContinuous
sec.PageSetup.Orientation = wdOrientLandscape
End Sub
was that of putting a landscape formatted section in the middle of a
portrait document. I wrote a macro that will find the first table
following a selection and make it landscape. Enjoy!
Sub LandscapeFollowingTable()
Dim sec As Word.Section, rng As Word.Range
Set rng = Selection.Range
'find the next table -- I'd find the enclosing table if I could
Set rng = rng.Next(wdTable, 1)
'create a section break before the table
Set sec = ActiveDocument.Sections.Add(rng, wdSectionContinuous)
'create a section break after the table
ActiveDocument.Sections.Add rng.Next, wdSectionContinuous
sec.PageSetup.Orientation = wdOrientLandscape
End Sub