#1
|
|||
|
|||
Deleting styles in Word2016-32 bit version
I have a document that uses a number of custom styles as well as having a number of unused custom styles. I am trying to delete unused styles. When I delete a style that has an outline level, strange things happen. Paragraphs that have custom styles suddenly have a different style applied. It occurs with either of the statements:
ActiveDocument.Styles("MyStyle").Delete or, Application.OrganizerDelete Source:=ActiveDocument.FullName, _ Name:="MyStyle", Object:=wdOrganizerObjectStyles The effect only occurs with Word 2016 32 bit version. It does not occur with Word 2016 64 bit version or Word 2010.There is no other styles based on these styles. Has anyone an idea what is happening? |
#2
|
||||
|
||||
When you delete a custom style that has been applied to content, that content changes its style to the "based on" style that the custom style had set. For example if MyStyle is based on "Body Text" and I delete MyStyle, then the content that used to have MyStyle applied to it now is using the Body Text style.
As far as I know, this is how all versions of Word work. You can't have content without a style applied so something has to happen. I presume that deleting a custom style that is NOT based on any style probably reverts the content to using 'Normal' but that is just a guess. If you have outline levels changing then you need to look at the differences between the custom style and the 'based on' style. If one of the differences is outline list level, what do you expect would happen?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Guessed
I am aware that deleting a style reverts any thing that used that style back to the based style. But that is not what is happening. The style that was deleted was not in use, was based on Normal and had no styles based on it. It is not necessarily an individual faulty style, it happens with any unused style that has a level number between 1 and 9 (level 10 indicates no level). The issue does not occur in the 64 bit version of Word2016. There are differences between the 32 and 64 bit versions. For example the statement: If Application.Version = 16 Then works in the 32 bit version but raises an error in the 64 bit version because it has stricter type checking. If others cannot replicate this problem then my copy of W2016 32 bit might be corrupted. |
#4
|
||||
|
||||
I've got a Word2016 32bit machine and haven't seen this behaviour (perhaps it is because I don't often delete styles unless I am doing large scale cleanups). Do you want to post a sample doc with the problematic style so I can have a look at what you mean?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
I cannot post the document which is confidential but I will try to cobble together a document that will demonstrate the problem.
|
#6
|
|||
|
|||
For help in cobbling, see suggestions here:
Trouble Shooting - Share OneDrive File - by Rohn |
#7
|
|||
|
|||
I get a different result every time I run a test, sometimes it works OK, sometimes applied styles get changed around when I delete an unused style, not always the same styles. It looks like my copy of Word 2016-32 bit is unstable or is affected by other applications that I may have running. I will do some more tests to try and determine what triggers the problem.
|
#8
|
|||
|
|||
The style deletion problem has gone away after the Windows update KB4586876 was carried out.The update also seems to have fixed a problem I had been having with WiFi dropout.
Both these problems started occurring about two months age. I wonder if they had been introduced by a Windows update at the time. |
#9
|
|||
|
|||
It would not be the first time that a Windows update messed things up. Likely will not be the last.
|
Tags |
32 bit word, 64 bit word |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word2016 text continuity | bluenite | Word | 4 | 08-31-2020 02:18 PM |
How to rearange styles order in mac version | Stingerhawk | Word | 3 | 04-30-2019 07:54 AM |
How to create relative hyperlink in word2016 | nofy | Word | 1 | 10-17-2016 01:08 AM |
deleting trial version of office 2013 to install MS Office 2010 | bookeress | Office | 1 | 09-26-2014 11:52 PM |
Deleting a script in an equation without deleting the whole term | allankey | Word | 1 | 02-15-2014 07:09 AM |