Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-27-2017, 06:09 AM
Alsadius Alsadius is offline Word is reverting my formatting semi-randomly after a third-party program removes sections Windows 7 64bit Word is reverting my formatting semi-randomly after a third-party program removes sections Office 2010 64bit
Novice
Word is reverting my formatting semi-randomly after a third-party program removes sections
 
Join Date: Nov 2017
Posts: 25
Alsadius is on a distinguished road
Default Word is reverting my formatting semi-randomly after a third-party program removes sections

Short version: Can anyone send me a guide that gives a really detailed description of how formatting works in Word? All the hidden mark-ups, stuff where I might need to dig into the XML of a .docx file in order to really understand it.

Long version: I'm working on a tool that takes a big Word document as a template, cuts out sections that aren't relevant to the final document I'm making, and spits a Word document back at me with the sections removed. However, I'm having persistent problems with the formatting of the text being incorrect immediately after a removed section. This has not been a problem in previous versions of this, and the third-party program has not changed, so I'm thinking that this is probably a problem with my formatting of the "template" Word document.

What seems to happen is that after a section is removed, the format will jump to something else. For example, I'll be writing a section where everything is in 11pt indigo-coloured font, and then after a small section is removed, it'll jump to 12pt black font(which is the document's default) until the end of the paragraph. At that point, the correct formatting will take over again.

The most complex instance of the problem is as follows: In the original Word document, there's the following text line-by-line:
(1pt white text tag, defining the end of the section which is being removed)


(8pt blank line)
(14pt black header-formatted text, with some parts highlighted)
(11pt blank line)
(11pt white text with dark red highlight, followed by 11pt white text with red highlight)

The following is what results after the removal:
(8pt blank line)
(14pt white header-formatted text, with some parts highlighted)
(11pt blank line)
(1pt white text with dark red highlight, followed by 11pt white text with red highlight)

The formatting of the removed section is carrying through in ways I do not understand, and that's causing issues with the final product. This is supposed to generate documents that go to our best clients, and the tool that creates them has to be used by my whole department, so it can't have issues like this when my updates are going live.

Thank you.
Reply With Quote
  #2  
Old 11-27-2017, 07:19 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is online now Word is reverting my formatting semi-randomly after a third-party program removes sections Windows 10 Word is reverting my formatting semi-randomly after a third-party program removes sections Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 3,906
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

It isn't unusual at all that formatting reverts back to the document defaults. This wouldn't happen, though, if formatting had been customized properly from the start. For example, you can create one or more paragraph styles that provides formatting which should be different from the document default.

It is up to the creator of the third-party program to ensure that it continues to be compatible with newer versions of Word.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #3  
Old 11-27-2017, 07:28 AM
Alsadius Alsadius is offline Word is reverting my formatting semi-randomly after a third-party program removes sections Windows 7 64bit Word is reverting my formatting semi-randomly after a third-party program removes sections Office 2010 64bit
Novice
Word is reverting my formatting semi-randomly after a third-party program removes sections
 
Join Date: Nov 2017
Posts: 25
Alsadius is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
It isn't unusual at all that formatting reverts back to the document defaults. This wouldn't happen, though, if formatting had been customized properly from the start. For example, you can create one or more paragraph styles that provides formatting which should be different from the document default.

It is up to the creator of the third-party program to ensure that it continues to be compatible with newer versions of Word.
How would I go about updating the document to properly use those paragraph styles? Note that this document is about 400 pages long, so any automated tools for fixing it up would really be appreciated, and recreating it from scratch is not practical(there's a lot of security and macros which are managed by different departments, so I can't mess with those).

Sorry, I know this one's a bit hairy.
Reply With Quote
  #4  
Old 11-27-2017, 07:51 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is online now Word is reverting my formatting semi-randomly after a third-party program removes sections Windows 10 Word is reverting my formatting semi-randomly after a third-party program removes sections Office 2013
Moderator
 
Join Date: Aug 2011
Posts: 3,906
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

You can change the document defaults yourself in the Manage Styles dialog box. However, whether that helps in this particular situation depends a lot on what the third-party program actually does.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #5  
Old 11-27-2017, 08:46 AM
Alsadius Alsadius is offline Word is reverting my formatting semi-randomly after a third-party program removes sections Windows 7 64bit Word is reverting my formatting semi-randomly after a third-party program removes sections Office 2010 64bit
Novice
Word is reverting my formatting semi-randomly after a third-party program removes sections
 
Join Date: Nov 2017
Posts: 25
Alsadius is on a distinguished road
Default

Long story short, there's a lot of XML-style tags embedded in the original Word doc(about 3500 of them). The relevant part of the other program reads these tags, then allows us to check off boxes saying which sections we want to keep and which we want to remove. If a section isn't checked off, it'll cut out the section from <Begin Section> to <End Section>. Otherwise, it'll strip the tags away and keep the text inside them.

The problems are always cropping up after a section is removed. If I had to guess I'd wager that a formatting definition is inside the removed text and that it's being removed, so Word is reverting to the default formats, but that's just a guess from my general computer knowledge, and I don't have enough understanding of the intricacies of Word formatting to feel confident that I have it right.
Reply With Quote
Reply

Tags
formatting text



Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving as image file removes formatting md61813 PowerPoint 0 03-01-2016 03:23 PM
Word is reverting my formatting semi-randomly after a third-party program removes sections New to word: formatting a program with bios and pix; needs to be easily editable. Where to start?! bgbg4us Word 1 04-02-2015 11:06 PM
Word 2007 - Spelling check keeps reverting to English U.S. WaltR Word 6 02-27-2015 08:20 PM
Software that removes Word code ep2002 Word 6 10-10-2014 07:35 PM
Word is reverting my formatting semi-randomly after a third-party program removes sections Formatting changing randomly Franuzz Word 1 07-14-2011 04:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:49 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