I got a long document in which all sections start with a new page.
Some of the sections feature the PageSetup Property = Landscape
Can I ask Word via VBA to show me all sections in a MsgBox that
feature this property, such as:
Section 5, 7, 9 have the "PageOrientation = Landscape" property.
Help is appreciated. Thank you very much in advance.
Regards,
Andreas
Dim i As Long
Dim Msg As String
Msg = ""
With ActiveDocument
For i = 1 To .Sections.Count
If .Sections(i).PageSetup.Orientation = wdOrientLandscape Then
Msg = Msg & i & ", "
End If
Next i
End With
Msg = Left(Msg, Len(Msg) - 2) & " have the PageOrientation = Landscape
property."
MsgBox Msg

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I got a long document in which all sections start with a new page.
> Some of the sections feature the PageSetup Property = Landscape
[quoted text clipped - 8 lines]
>
> Andreas
andreas - 15 Feb 2007 21:54 GMT
On 15 Feb., 21:39, "Doug Robbins - Word MVP" <d...@REMOVECAPSmvps.org>
wrote:
> Dim i As Long
> Dim Msg As String
[quoted text clipped - 32 lines]
>
> - Zitierten Text anzeigen -
Doug, Perfect, Thank you very much.
Regards,
Andreas