View Single Post
 
Old 06-24-2021, 07:36 PM
jec1 jec1 is offline Windows 7 32bit Office 2013
Advanced Beginner
 
Join Date: Jan 2012
Posts: 84
jec1 is on a distinguished road
Default Trying to uncheck Limit formatting to permitted styles in Word document

Hi,

The below macros works fine - but when I try to uncheck Limit formatting to permitted styles

Runtime error 5 - Debug
CommandBars("Restrict Editing").Visible = False does not work - any ideas please?

Sub AttachUCPRStyles1()

‘Call jec_StylesHide

With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = "C:\Users\janin\AppData\Roaming\Microsoft\Template s\UCPR v1.dotx"
.UpdateStylesOnOpen = False
.AttachedTemplate = "Normal"
End With

CommandBars("Restrict Editing").Visible = False

‘Call SetStylesPaneToAllAlphabetical

End Sub
Reply With Quote