News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Word 365—Want Fixed Nav + Style Pane sizes

    Home Forums AskWoody support Productivity software by function MS Word and word processing help Word 365—Want Fixed Nav + Style Pane sizes

    This topic contains 6 replies, has 4 voices, and was last updated by

     Andrew Lockton 1 day, 8 hours ago.

    • Author
      Posts
    • #350598 Reply

      Lugh
      AskWoody_MVP

      My standard Word work window has the Navigation & Style panes open on each side of the main content section.

      WordPanes

      Maybe 2 months ago, the panes changed size to larger than before and changing them to my preferred sizes didn’t stick—I tried Shift-click closing and changing the pane sizes in my template.

      Is there some way to make my preferred sizes stick, like they’ve done for years?

      PS I have the following auto macros:

      Sub AutoOpen()
       ActiveWindow.View.Type = wdWebView 'open in Web Layout
       ActiveWindow.View.Zoom.Percentage = 120 'Zoom %
       Application.TaskPanes(wdTaskPaneFormatting).Visible = True 'open Style Pane
       Application.TaskPanes(wdTaskPaneNav).Visible = True 'open Nav Pane
       End Sub
      
      Sub AutoNew()
       ActiveWindow.View.Type = wdWebView 'open in Web Layout
       ActiveWindow.View.Zoom.Percentage = 120 'Zoom %
       Application.TaskPanes(wdTaskPaneFormatting).Visible = True 'open Style Pane
       Application.TaskPanes(wdTaskPaneNav).Visible = True 'open Nav Pane
       End Sub
      

      Lugh.
      ~
      Alienware Aurora R6; Win10 Home x64 1803; Office 365 x32
      i7-7700; GeForce GTX 1060; 16GB DDR4 2400; 2 x 256G SSD, 4TB HD

      • This topic was modified 1 week ago by
         Lugh.
      • This topic was modified 1 week ago by
         Lugh. Reason: PS add macros code
      Attachments:
      You must be logged in to view attached files.
    • #350852 Reply

      anonymous

      Try

      With CommandBars(“Navigation”)
      
      .Visible = True
      
      .Width = 200
      
      .Position = msoBarLeft
      
      End With
      1 user thanked author for this post.
      • #350857 Reply

        PKCano
        Da Boss

        Please see this blogpost about posting code.

        Use the [ pre ] and [ /pre ] tags to prevent problems with posting.

      • #350888 Reply

        Lugh
        AskWoody_MVP

        Try

        Thanks for your effort Anon, I get…

        Run-time error ‘9’:
        Subscript out of range

        …and no change in either pane’s behavior.

        Clicking Debug highlights the line…

        With CommandBars(“Navigation”) ‘fixed pane width

        I searched on “Subscript out of range”, but got nothing for Word—and only dodgy sites for Excel.

        Fyi I pasted your code into my 2 Auto macros, immediately before End Sub.

        Lugh.
        ~
        Alienware Aurora R6; Win10 Home x64 1803; Office 365 x32
        i7-7700; GeForce GTX 1060; 16GB DDR4 2400; 2 x 256G SSD, 4TB HD

        • #443709 Reply

          anonymous

          Lugh

          This site converts the straight ” into smart “.

          Try retyping the double quotes either side of Navigation and make sure they become straight.

          1 user thanked author for this post.
    • #467122 Reply

      Lugh
      AskWoody_MVP

      Try retyping the double quotes either side of Navigation and make sure they become straight

      Excellent Anon, that worked, thank you!

      I extrapolated your code, which also worked for the Styles pane on the right side—so here it is for anyone else who wants a setup like mine:

       With CommandBars("Navigation") 'fixed pane width
      .Visible = True
      .Width = 300
      .Position = msoBarLeft
      End With
       With CommandBars("Styles") 'fixed pane width
      .Visible = True
      .Width = 300
      .Position = msoBarRight
      End With
      

      Put the above in the AutoOpen & AutoNew subs of your template if you want this every time—I have mine in the Normal template, since I want this setup for all Word docs.

      I you don’t want it every time, I assume putting the code in its own Sub will give you the option on demand. You might want to attach it to a custom button in the ribbon.
      Alternatively, put it in a custom template, rather than Normal.

      Lugh.
      ~
      Alienware Aurora R6; Win10 Home x64 1803; Office 365 x32
      i7-7700; GeForce GTX 1060; 16GB DDR4 2400; 2 x 256G SSD, 4TB HD

      • This reply was modified 1 day, 22 hours ago by
         Lugh. Reason: Add last paragraph
      • #494421 Reply

        Andrew Lockton
        AskWoody_MVP

        Your welcome. Good to see you got it working.

        If you were going to be putting this into its own sub, I would make it a toggler to show/hide the panes by doing the following. Note that this would be a bad idea in the Auto macros.

        Sub TogglePanes()
        With CommandBars("Navigation") 'fixed pane width
        .Visible = Not .Visible
        .Width = 300
        .Position = msoBarLeft
        End With
         With CommandBars("Styles") 'fixed pane width
        .Visible = Not .Visible
        .Width = 300
        .Position = msoBarRight
        End With
        End Sub
        1 user thanked author for this post.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Word 365—Want Fixed Nav + Style Pane sizes

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.

    Your information:


    Comments are closed.