They use a template that has a VBA/macro code in it that enables them to do some tasks. I can scan through it. Do you know of any specific functions/properties I should look for that deal with adding styles?
Stop Word from adding new styles automatically
Using Microsoft 365. As I edit a document, new styles are added to the styles list.
I made sure the "Keep track of formatting" check box in the Advanced options is unchecked.
In the Styles options, I unchecked the three check boxes under "Select formatting to show as styles."
Still having the issue with new styles being added.
Microsoft 365 and Office | Word | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
10 answers
Sort by: Most helpful
-
Anonymous
2023-01-05T18:05:05+00:00 -
Charles Kenyon 160K Reputation points Volunteer Moderator2023-01-05T20:04:53+00:00 They use a template that has a VBA/macro code in it that enables them to do some tasks. I can scan through it. Do you know of any specific functions/properties I should look for that deal with adding styles?
You could look at the code for the words "styles" or "style." I would talk to the author of the vba.
-
Stefan Blom 325K Reputation points MVP Volunteer Moderator2023-01-05T20:06:50+00:00 Code that explicitly adds a style would be something along the lines of:
ActiveDocument.Styles.Add Name:="Style name", Type:=wdStyleTypeParagraphCertain other actions, such as copying content from external sources, may also result in a style being created in the target document.
-
Anonymous
2023-01-05T22:08:39+00:00 I searched the entire VBA project for the word "style" and nothing came up. I will observe it some more and see if I can find more info on when it happens.
Thanks to everyone for the help.
-
Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator2023-01-06T03:27:53+00:00 If you send me a copy of the template, referencing this thread in the covering email message, I will investigate the issue.