Setting Apply Styles dialogue to the side of document view
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Setting Apply Styles dialogue to the side of document view
Ctrl + shift + s opens the Apply Styles dialogue in Word in the center of my document view. Each time it opens, I need to manually move it to the side of the document. How can I get the dialogue to always open on the side of the document?
Regards,
JMT
JMT
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
You could create the following macro in Normal.dotm and assign it to Ctrl+Shift+S:
Code: Select all
Sub ApplyStyles()
With CommandBars("Apply Styles")
.Left = Application.PointsToPixels(Application.Left)
.Visible = True
End With
End Sub
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 615
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Setting Apply Styles dialogue to the side of document vi
Even handier, in my opinion would be to make it a toggle command.
(I tried ".Visible = Not .Visible" but for some reason the compiler did not like it.)
Code: Select all
Sub ApplyStyles()
Dim bVisible as Boolean
With CommandBars("Apply Styles")
bVisible = Not .Visible
.Left = Application.PointsToPixels(Application.Left)
.Visible = bVisible
End With
End Sub
Last edited by Charles Kenyon on 08 Mar 2020, 20:52, edited 1 time in total.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Re: Setting Apply Styles dialogue to the side of document vi
For some reason, macros never save properly on my computer. When I create a macro, after a few restarts of Word it usually disappears. I was never able to figure out why.
Regards,
JMT
JMT
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
There is no way to do what you want without using VBA.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 615
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Setting Apply Styles dialogue to the side of document vi
This is a MUCH bigger problem.jmt356 wrote:For some reason, macros never save properly on my computer. When I create a macro, after a few restarts of Word it usually disappears. I was never able to figure out why.
Try storing them in a separate Global Template rather than in the normal template.
http://www.addbalance.com/usersguide/te ... htm#Global
https://wordmvp.com/FAQs/MacrosVBA/OrganizeMacros.htm
http://gregmaxey.com/word_tip_pages/ins ... acros.html
http://www.addbalance.com/word/movetotemplate.htm
I suspect that if you are in a corporate environment some IT person is replacing your normal.dotm template.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Re: Setting Apply Styles dialogue to the side of document vi
Ctrl + shift + s opens the Apply Styles windows. Is there a keyboard shortcut to close the Apply Styles dialogue window?
Regards,
JMT
JMT
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
Make sure that a text box or button in the task pane/dialog has the focus.
Press Ctrl+Spacebar to display a dropdown menu.
Press C to activate Close.
Press Ctrl+Spacebar to display a dropdown menu.
Press C to activate Close.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Re: Setting Apply Styles dialogue to the side of document vi
Thank you. That accomplishes what I want to achieve (getting the Apply Styles window out of the view) without having to use a macro or manually x it out each time with the mouse.
Regards,
JMT
JMT
-
- 5StarLounger
- Posts: 615
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Setting Apply Styles dialogue to the side of document vi
If you use the toggle code I suggested above, Ctrl+Shift+S will open and close the Apply Styles dialog.jmt356 wrote:Ctrl + shift + s opens the Apply Styles windows. Is there a keyboard shortcut to close the Apply Styles dialogue window?
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Re: Setting Apply Styles dialogue to the side of document vi
I tried using the toggle code you suggested above. I then went to Developer | Macros | selected the Macro and clicked Run. I received the following error:Charles Kenyon wrote:If you use the toggle code I suggested above, Ctrl+Shift+S will open and close the Apply Styles dialog.jmt356 wrote:Ctrl + shift + s opens the Apply Styles windows. Is there a keyboard shortcut to close the Apply Styles dialogue window?
Run-time error:
Method 'Visible' of object 'CommandBar' failed.
However, on the positive side, the Apply Styles dialogue is now opening on the left of the screen.
How do I assign the macro to ctrl + shift + s?
Regards,
JMT
JMT
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
Select Fille > Options.
Select 'Customize Ribbon' in the navigation pane on the left.
Click the Customize... button next to 'Keyboard shortcuts' near the bottom of the dialog.
Scroll down the list of Categories and select Macros.
Select ApplyStyles in the list of Macros.
Click in the 'Press new shortcut key' box.
Press Ctrl+Shift+S.
Click Assign.
Select 'Customize Ribbon' in the navigation pane on the left.
Click the Customize... button next to 'Keyboard shortcuts' near the bottom of the dialog.
Scroll down the list of Categories and select Macros.
Select ApplyStyles in the list of Macros.
Click in the 'Press new shortcut key' box.
Press Ctrl+Shift+S.
Click Assign.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
Try this version of the macro:
Code: Select all
Sub ApplyStyles()
With CommandBars("Apply Styles")
If .Visible Then
.Visible = False
Else
.Left = Application.PointsToPixels(Application.Left)
.Visible = True
End If
End With
End Sub
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Re: Setting Apply Styles dialogue to the side of document vi
Hans,
In your list of instructions, I got up to select Macros. I did not see a list of Macros and thus could not select ApplyStyles.
What does your latest Macro (Post=265328) do? Does it move Apply Styles to the Left or toggle the Apply Styles window between visible and invisible when I click press ctrl + shift + s?
In your list of instructions, I got up to select Macros. I did not see a list of Macros and thus could not select ApplyStyles.
What does your latest Macro (Post=265328) do? Does it move Apply Styles to the Left or toggle the Apply Styles window between visible and invisible when I click press ctrl + shift + s?
Regards,
JMT
JMT
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
If you don't see macros, you haven't created macros, at least not in the document or template listed in 'Save changes in'.
The latest macro that I posted will close the Apply Styles pane if it's currently open, and display it at the left side of the document/application window if it's currently closed.
The latest macro that I posted will close the Apply Styles pane if it's currently open, and display it at the left side of the document/application window if it's currently closed.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2389
- Joined: 28 Mar 2010, 01:49
Re: Setting Apply Styles dialogue to the side of document vi
I do not see ApplyStyles in in the list of Macros (earlier, I was selecting Macros in the list that displayed when I had Popular Commands displayed under "Choose commands from." But when I choose Macros from "Choose commands from," I see ApplyStyles.
I am using Charles' Macro and it works but now when I launch Apply Styles, the style name name is no longer highlighted so I can no longer tab my way to the Modify button.
I am using Charles' Macro and it works but now when I launch Apply Styles, the style name name is no longer highlighted so I can no longer tab my way to the Modify button.
Regards,
JMT
JMT
-
- Administrator
- Posts: 78478
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Setting Apply Styles dialogue to the side of document vi
I did explicitly mention that you should scroll down the list of Categories and select Macros, not Popular Commands...
Try pressing Ctrl+6 after pressing Ctrl+Shift+S. This should set focus to the style in the taskpane.
Try pressing Ctrl+6 after pressing Ctrl+Shift+S. This should set focus to the style in the taskpane.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 615
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: Setting Apply Styles dialogue to the side of document vi
The macro was named "ApplyStyles." The command is StyleApplyPane.jmt356 wrote:I do not see ApplyStyles in in the list of Macros (earlier, I was selecting Macros in the list that displayed when I had Popular Commands displayed under "Choose commands from." But when I choose Macros from "Choose commands from," I see ApplyStyles.
I am using Charles' Macro and it works but now when I launch Apply Styles, the style name name is no longer highlighted so I can no longer tab my way to the Modify button.
Even though the Style is not highlighted, if you click on the Modify button, it will give you the Modify Style dialog for that style.
The following macros may help
Code: Select all
Sub ApplyStylesPosition()
CommandBars("Apply Styles").Left = Application.PointsToPixels(Application.Left)
End Sub
Sub ApplyStylesHide()
CommandBars("Apply Styles").Visible = False
End Sub
The Position one parks it on the left, whether open or closed but does not change the visible status. Once it is run during a Word session, it will hold the position, unless you otherwise move the Apply Styles pane.
The Hide one closes it.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word