Wednesday 20 September 2017

microsoft office - Automatically remove custom styles from Word document, but save formatting


Given: a .doc(x) file with custom formatting styles applied to some text (example).


Get: a .doc(x) file which is formatted as the given file but does not define any custom styles (example).


I tried converting to .rtf, but unfortunately it saves information about styles.




"Clear formatting" command clears formatting (resets to default), but I need to save it. Removing the style does the same thing (example). This is not what I want.


I just need to remove custom styles, but preserve formatting.



Answer



If you have access to Microsoft Excel:



  1. Select all in the Word doc

  2. Paste into Excel (which supports the formatting but not the styles)

  3. While the contents are still selected in Excel (after pasting), immediately copy

  4. Paste back into a new Word doc


I tested this with both your docs using Word and Excel 2010; it preserves the formatting but gets rid of the custom styles.


EDIT: for the more complex examples posted, do the same as above, but use WordPad instead of Excel. I.e. copy all in Word, paste into WordPad, then select-all in WordPad and paste back into a new document. This succeeds (in my test) for everything except the footer, which of course you could do separately (copy, paste out, then copy / paste back into the new document's footer).


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...