Office: 3-4 Panele Pseudo-FensterSplit

Helfe beim Thema 3-4 Panele Pseudo-FensterSplit in Microsoft Word Hilfe um das Problem gemeinsam zu lösen; Hallo Erneut! "Split window" (Fenster teilen) kann nur einmal genutzt werden um das Fenster 1x zu teilen für 2 Horizontale Panele, was nicht immer für... Dieses Thema im Forum "Microsoft Word Hilfe" wurde erstellt von Buggy, 2. August 2025 um 11:37 Uhr.

  1. Buggy Erfahrener User

    3-4 Panele Pseudo-FensterSplit


    Hallo Erneut!
    "Split window" (Fenster teilen) kann nur einmal genutzt werden um das Fenster 1x zu teilen für 2 Horizontale Panele, was nicht immer für meine Zwecke ausreichend ist. Ich brauche häufig 3 manchmal sogar 4 Panele untereinander.
    Mittels "duplicate window" (Fenster Duplizieren, welches zs. auch gesplitet werden kann) in VBA und ohne die Menuzeile, Statuszeile, toolbars und Lineal maximiere ich die Document angezeigte Fläche auf dem Bildschirm.
    Die pseudo 3 bzw. 4-Panele Ansicht ist gleichmäßig arrangiert. Soweit so gut.

    Was jetzt noch fehlt ist, daß das duplizierte Fenster mit dem Original verlinkt ist damit

    1) beim Verschieben des des Original Fensters, das Duplikat als Anhängsel in Postion mit verschoben wird
    2) beim Größe ändern des Einen, daß das Andere mitmacht, sowohl vertikal (seitwärts gleichmäßig) als auch horizontal (proportional zueinander, wie der echte Split "pseudo resize bar")
    sowie
    3) die Titelzeile des Duplikat Fensters zu verstecken. Die ist für Formular möglich, ich konnte aber nichts finden für das eigentliche Word Fenster
    4) Beibehalten der ursprünglichen in-Dokument Cursor Position im gesplitteten Fenster wie im Original. Manchmal öffnet der Split am Document Anfang...

    Ist das in irgeneiner Weise machbar? Mit bzw ohne API?

    3-4 Panele Pseudo-FensterSplit 3-4 panes.png

    Pseudo 3 Panele:
    Code:
        Sub DuplicateSplitWindow_H()                                        ' create pseudo TriplePane
        ' Get Dimensions+Positions (Normal W+L, Maximzied H) independant of screen size
            Dim Wnor As Long:   Wnor = Application.Width:       Dim Lnor As Long:   Lnor = Application.Left:    Dim hTB As Long: hTB = 18
            Application.WindowState = wdWindowStateMaximize
            Dim Hmax As Long:   Hmax = Application.Height:      Dim Wmax As Long:   Wmax = Application.Width
    '        Application.VBE.Windows("Immediate").Visible = True: Debug.Print "Hmax:"; Hmax, "Wmax:"; Wmax ', "Wnor:"; Wnor, "Lnor:"; Lnor
            Application.WindowState = wdWindowStateNormal                   ' not minimized
        ' Duplicate
            newWindow                                                       ' Duplicate Window
            Windows(ActiveDocument.Name & ":1").Activate: Windows.Arrange   ' align below main * initial ':1' split at top
            Windows(ActiveDocument.Name & ":2").Activate                    ' Select Bottom to remove Toolbars
                Call OffToolbars                                            ' Main TB + all else
                ActiveWindow.ActivePane.DisplayRulers = False               ' remove Ruler
        ' Resize H & Reposition T, keep W + L
            Windows(ActiveDocument.Name & ":1").Activate
            Dim isSplit As Boolean: isSplit = ActiveWindow.Split
            If isSplit = True Then                                          ' If Split, than 2/3+1/3 of screen size ! text not window
                Application.Resize Height:=Hmax * 5 / 7, Width:=Wnor
                Application.Move Top:=hTB, Left:=Lnor                       ' below to T-TaskBar
                Application.DisplayStatusBar = False                        ' remove StatusBar
                Windows(ActiveDocument.Name & ":2").Activate
                    Application.Resize Height:=Hmax * 2 / 7, Width:=Wnor
                    Application.Move Top:=Hmax * 5 / 7 + hTB, Left:=Lnor
                    Application.DisplayStatusBar = True                     ' add StatusBar
            Else                                                            ' If not Split, keep existing 1/2+1/2 ! text not window
                Application.Resize Height:=Hmax * 4 / 7, Width:=Wnor
                Application.Move Top:=hTB, Left:=Lnor                       ' below to T-taskbar
                Application.DisplayStatusBar = False                        ' remove StatusBar
                Windows(ActiveDocument.Name & ":2").Activate
                    Application.Resize Height:=Hmax * 3 / 7, Width:=Wnor
                    Application.Move Top:=Hmax * 4 / 7 + hTB, Left:=Lnor
                    Application.DisplayStatusBar = True                     ' add StatusBar
        '            Application.CommandBars("Menu Bar").Position = msoBarBottom ' as MenuBar R out-of-window DNW inside here, called seperately in Toggle
             End If
        End Sub
    Pseudo 4 Panele:
    Code:
        Sub DuplicateSplitWindow_H_Dsplit()                                 ' create pseudo QuadPane
        ' Get Dimensions+Positions (Normal W+L, Maximzied H) independant of screen size
            Dim Wnor As Long:   Wnor = Application.Width:       Dim Lnor As Long:   Lnor = Application.Left:    Dim hTB As Long: hTB = 18
            Application.WindowState = wdWindowStateMaximize
            Dim Hmax As Long:   Hmax = Application.Height:      Dim Wmax As Long:   Wmax = Application.Width
    '        Application.VBE.Windows("Immediate").Visible = True: Debug.Print "Hmax:"; Hmax, "Wmax:"; Wmax ', "Wnor:"; Wnor, "Lnor:"; Lnor
            Application.WindowState = wdWindowStateNormal                   ' not minimized
        ' Duplicate
            newWindow                                                       ' Duplicate Window
            Windows(ActiveDocument.Name & ":1").Activate: Windows.Arrange   ' align below main * initial ':1' split at top
            Windows(ActiveDocument.Name & ":2").Activate                    ' Select Bottom to remove Toolbars
                Call OffToolbars                                            ' Main TB + all else
                ActiveWindow.ActivePane.DisplayRulers = False               ' remove Ruler
        ' Resize H & Reposition T, keep W + L
            Windows(ActiveDocument.Name & ":1").Activate
            Dim isSplit As Boolean: isSplit = ActiveWindow.Split
            If isSplit = True Then                                          ' If Split, than 2/3+1/3 of screen size ! text not window
                Application.Resize Height:=Hmax * 3 / 5, Width:=Wnor
                Application.Move Top:=hTB, Left:=Lnor                       ' below to T-TaskBar
                Application.DisplayStatusBar = False                        ' remove StatusBar
                Windows(ActiveDocument.Name & ":2").Activate
                    Application.Resize Height:=Hmax * 2 / 5, Width:=Wnor
                    Application.Move Top:=Hmax * 3 / 5 + hTB, Left:=Lnor
                    ActiveWindow.SplitVertical = 50                         ' insert split
                    Application.DisplayStatusBar = True                     ' add StatusBar
            Else                                                            ' If not Split, keep existing 1/2+1/2 ! text not window
                Application.Resize Height:=Hmax * 5 / 11, Width:=Wnor
                Application.Move Top:=hTB, Left:=Lnor                       ' below to T-taskbar
                Application.DisplayStatusBar = False                        ' remove StatusBar
                Windows(ActiveDocument.Name & ":2").Activate
                    Application.Resize Height:=Hmax * 6 / 11, Width:=Wnor
                    Application.Move Top:=Hmax * 5 / 11 + hTB, Left:=Lnor
                    ActiveWindow.SplitVertical = 50                         ' insert split
                    Application.DisplayStatusBar = True                     ' add StatusBar
        '            Application.CommandBars("Menu Bar").Position = msoBarBottom ' as MenuBar R out-of-window DNW inside here, called seperately in Toggle
             End If
        End Sub
    Folgendes verschiebt die Menu-zeile des Duplikates außerhalb des sichtbaren Bildschirms. Im Prinzip sitzt die obere linke Ecke der "floating" Menuzeile in des Bildschirms unterer rechter Ecke (minimal 1 pixel Punkt Überlappung möglich), somit nicht mehr sichbar (Einstellung für meine Bildschirm-Dimensionen, für Andere müsste dies vermutlich angepasst werden)
    Code:
            Sub MoveMenuBarRightOutOfWindow_viaScreenSize()
        ' check screensize              needs: Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long   ' need by CheckScreenSize
            Dim Wscreen As Long, Hscreen As Long: Wscreen = GetSystemMetrics(0): Hscreen = GetSystemMetrics(1)
            Windows(ActiveDocument.Name & ":2").Activate
                Application.CommandBars("Menu Bar").Position = msoBarFloating
                Application.CommandBars("Menu Bar").Left = Wscreen - 1 ' = 1365 max the MB can be move out of screen
                Application.CommandBars("Menu Bar").Top = Hscreen - 29 ' = 739  max the MB can be move out of screen
    '        Application.VBE.Windows("Immediate").Visible = True:
    '            Debug.Print "Screen Width: " & Wscreen & vbCrLf & "Screen Height: " & Hscreen
    '            Debug.Print "L:"; Application.CommandBars("Menu Bar").Left, "T:"; Application.CommandBars("Menu Bar").Top
        End Sub
    Damit es getoggled werden kann:
    Code:
        Sub Toggle_SplitWindowDuplication_H_Dsplit()
            On Error Resume Next: Dim windowName As String: windowName = ActiveDocument.Name & ":2"
            Dim duplicateWindow As Window: Set duplicateWindow = Application.Windows(windowName): On Error GoTo 0
            If Not duplicateWindow Is Nothing Then
                Call UnDuplicateSplitWindow_H
            Else
                Call DuplicateSplitWindow_H_Dsplit: Call MoveMenuBarRightOutOfWindow_viaScreenSize
            End If
        End Sub
        Sub Toggle_SplitWindowDuplication_H()
            On Error Resume Next: Dim windowName As String: windowName = ActiveDocument.Name & ":2"
            Dim duplicateWindow As Window: Set duplicateWindow = Application.Windows(windowName): On Error GoTo 0
            If Not duplicateWindow Is Nothing Then
                Call UnDuplicateSplitWindow_H
            Else
                Call DuplicateSplitWindow_H: Call MoveMenuBarRightOutOfWindow_viaScreenSize
            End If
        End Sub
        Sub UnDuplicateSplitWindow_H()
            Windows(ActiveDocument.Name & ":2").Close                       ' close 2nd
            Application.WindowState = wdWindowStateMaximize
                Dim Hmax As Long:   Hmax = Application.Height               ' get max height for restoration
            Application.WindowState = wdWindowStateNormal
                 Dim Wnor As Long:   Wnor = Application.Width               ' keep width
            Application.DisplayStatusBar = True                             ' re-add StatusBar
            Application.Resize Height:=Hmax, Width:=Wnor
        End Sub
    
     
Thema:

3-4 Panele Pseudo-FensterSplit

  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.
    Information ausblenden