Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2023, 03:25 PM
NitroPress NitroPress is offline Set "Styles in Current Doc" with macro? Windows 11 Set "Styles in Current Doc" with macro? Office 2016
Novice
Set "Styles in Current Doc" with macro?
 
Join Date: Nov 2019
Posts: 22
NitroPress is on a distinguished road
Default Set "Styles in Current Doc" with macro?

I have a nifty little macro that sets up a document workspace the way I like it — Nav and Style panes glued to the edges, and a designated zoom factor:




Code:
Sub FullOpenDoc()
'
' Open doc with Nav and Styles panels, to selected Zoom
'

ActiveWindow.DocumentMap = True

With Application
.TaskPanes(wdTaskPaneFormatting).Visible = True
.CommandBars("Styles").Position = msoBarRight
.CommandBars("Styles").Width = 350
End With

' Set zoom value to that from your adjusted zoom slider

ActiveWindow.ActivePane.View.Zoom.Percentage = 112

End Sub
I'd like to add a function to set the Styles display (under the Options button) to "In current document" but I've failed to record a working sequence for this. Anyone have a script line for that?
Reply With Quote
  #2  
Old 01-18-2023, 03:36 PM
Italophile Italophile is offline Set "Styles in Current Doc" with macro? Windows 11 Set "Styles in Current Doc" with macro? Office 2021
Expert
 
Join Date: Mar 2022
Posts: 315
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Document.FormattingShowFilter property (Word) | Microsoft Learn
Reply With Quote
  #3  
Old 01-18-2023, 03:56 PM
NitroPress NitroPress is offline Set "Styles in Current Doc" with macro? Windows 11 Set "Styles in Current Doc" with macro? Office 2016
Novice
Set "Styles in Current Doc" with macro?
 
Join Date: Nov 2019
Posts: 22
NitroPress is on a distinguished road
Default

Bingo. Grazie.
Reply With Quote
  #4  
Old 01-18-2023, 06:49 PM
Charles Kenyon Charles Kenyon is offline Set "Styles in Current Doc" with macro? Windows 11 Set "Styles in Current Doc" with macro? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Do not plan on your macro controlling the width of the Styles pane in later versions of Word.
Reply With Quote
  #5  
Old 01-18-2023, 08:26 PM
NitroPress NitroPress is offline Set "Styles in Current Doc" with macro? Windows 11 Set "Styles in Current Doc" with macro? Office 2016
Novice
Set "Styles in Current Doc" with macro?
 
Join Date: Nov 2019
Posts: 22
NitroPress is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Do not plan on your macro controlling the width of the Styles pane in later versions of Word.
Noted. thanks.


Since WOffice hasn't been actually, you know, improved since about v2010, if then, I plan on staying with v2016 until we don't use words any more.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying and then hiding all but a few "approved" styles into current document andremadar Word VBA 1 11-17-2022 09:54 PM
Excel 2003: VBA "Function" causes "#VALUE!" errors after running "insert/delete row" custom macro Matt C Excel Programming 2 01-08-2022 06:03 AM
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas jocke321 Word VBA 2 12-10-2014 11:27 AM
What controls the "Fit slide to current window" percentage? DBlomgren PowerPoint 5 03-03-2014 12:19 AM
Set "Styles in Current Doc" with macro? Macro to print "Current Page" in Word 2010 Jshopping Word VBA 10 06-08-2012 01:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft