Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-02-2020, 03:31 PM
kae0088 kae0088 is offline Deleting styles in Word2016-32 bit version Windows 7 64bit Deleting styles in Word2016-32 bit version Office 2010 32bit
Novice
Deleting styles in Word2016-32 bit version
 
Join Date: May 2012
Location: Melbourne, Australia
Posts: 20
kae0088 is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 12-02-2020, 06:14 PM
Guessed's Avatar
Guessed Guessed is offline Deleting styles in Word2016-32 bit version Windows 10 Deleting styles in Word2016-32 bit version Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 12-02-2020, 07:54 PM
kae0088 kae0088 is offline Deleting styles in Word2016-32 bit version Windows 7 64bit Deleting styles in Word2016-32 bit version Office 2010 32bit
Novice
Deleting styles in Word2016-32 bit version
 
Join Date: May 2012
Location: Melbourne, Australia
Posts: 20
kae0088 is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 12-02-2020, 09:18 PM
Guessed's Avatar
Guessed Guessed is offline Deleting styles in Word2016-32 bit version Windows 10 Deleting styles in Word2016-32 bit version Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,975
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #5  
Old 12-02-2020, 09:45 PM
kae0088 kae0088 is offline Deleting styles in Word2016-32 bit version Windows 7 64bit Deleting styles in Word2016-32 bit version Office 2010 32bit
Novice
Deleting styles in Word2016-32 bit version
 
Join Date: May 2012
Location: Melbourne, Australia
Posts: 20
kae0088 is on a distinguished road
Default

I cannot post the document which is confidential but I will try to cobble together a document that will demonstrate the problem.
Reply With Quote
  #6  
Old 12-04-2020, 01:04 PM
Charles Kenyon Charles Kenyon is offline Deleting styles in Word2016-32 bit version Windows 10 Deleting styles in Word2016-32 bit version Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,138
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

For help in cobbling, see suggestions here:
Trouble Shooting - Share OneDrive File - by Rohn
Reply With Quote
  #7  
Old 12-04-2020, 09:51 PM
kae0088 kae0088 is offline Deleting styles in Word2016-32 bit version Windows 7 64bit Deleting styles in Word2016-32 bit version Office 2010 32bit
Novice
Deleting styles in Word2016-32 bit version
 
Join Date: May 2012
Location: Melbourne, Australia
Posts: 20
kae0088 is on a distinguished road
Default

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.
Reply With Quote
  #8  
Old 12-05-2020, 11:18 PM
kae0088 kae0088 is offline Deleting styles in Word2016-32 bit version Windows 7 64bit Deleting styles in Word2016-32 bit version Office 2010 32bit
Novice
Deleting styles in Word2016-32 bit version
 
Join Date: May 2012
Location: Melbourne, Australia
Posts: 20
kae0088 is on a distinguished road
Default

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.
Reply With Quote
  #9  
Old 12-07-2020, 11:19 AM
Charles Kenyon Charles Kenyon is offline Deleting styles in Word2016-32 bit version Windows 10 Deleting styles in Word2016-32 bit version Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,138
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

It would not be the first time that a Windows update messed things up. Likely will not be the last.
Reply With Quote
Reply

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
Deleting styles in Word2016-32 bit version How to rearange styles order in mac version Stingerhawk Word 3 04-30-2019 07:54 AM
Deleting styles in Word2016-32 bit version How to create relative hyperlink in word2016 nofy Word 1 10-17-2016 01:08 AM
Deleting styles in Word2016-32 bit version deleting trial version of office 2013 to install MS Office 2010 bookeress Office 1 09-26-2014 11:52 PM
Deleting styles in Word2016-32 bit version Deleting a script in an equation without deleting the whole term allankey Word 1 02-15-2014 07:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:12 AM.


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