Selectively removing formatting styles from Docs

B

Bonsai Bill

I received 23 files from a publisher so that I could write a second edition
of a book. The rtf files contain over 30 different styles. However publisher
wants returned manuscripts to have no formatting other than headings,
subscripts, superscripts, italics and bold.

One painful way is to manually clear all formatting in each chapter then go
back and put in headings, etc. I looked through Help but found no easy way to
automate this using a macro. I am not that knowledgeable in Word VBA which is
no help.

Could someone please provide some sample lines of code that I could build
upon to write a macro to clear the many styles. I use OfficeXP but can use
Office 2007.

Thanks for your help.
 
J

Jean-Guy Marcil

Bonsai Bill said:
I received 23 files from a publisher so that I could write a second edition
of a book. The rtf files contain over 30 different styles. However publisher
wants returned manuscripts to have no formatting other than headings,
subscripts, superscripts, italics and bold.

One painful way is to manually clear all formatting in each chapter then go
back and put in headings, etc. I looked through Help but found no easy way to
automate this using a macro. I am not that knowledgeable in Word VBA which is
no help.

I believe that you have to apply the new styles manually since I doubt there
exists a logic that can be used to automatically substitute old styles with
new ones.

You can remove all old styles easily:
CTRL-A (To select the whole document)
CTRL-SHIFT-N (To apply the Normal style everywhere)
CTRL-Q (To reset all paragraphs so as to remove manual paragraph formatting)
CTRL-Space Bar (To remove all manual Font formatting)

Create a template containing only the styles you need to apply.
Copy the above selected text from the original document to a new document
based on the new template. This way, old styles will not be present in the
new document.

This is how I normally do it, and I often have to do the kind of task you
are now facing.
 
B

Bonsai Bill

Hi Jean-Guy,

Thanks for your suggested procedure. i have decided to use the formatting to
identify what text has been updated. as i edit/review each paragraph I am
changing back to Normal which clearly marks where I am (I use bookmark too).
Publisher wants text in limited format but doesn't care that there are many
unused styles present.

I wish Word VBA was a little more powerful. I am used to Excel VBA which
provides many more functions and makes more sense, at least to me.

Thanks
 
J

Jean-Guy Marcil

Bonsai Bill said:
Hi Jean-Guy,

Thanks for your suggested procedure. i have decided to use the formatting to
identify what text has been updated. as i edit/review each paragraph I am
changing back to Normal which clearly marks where I am (I use bookmark too).
Publisher wants text in limited format but doesn't care that there are many
unused styles present.

I wish Word VBA was a little more powerful. I am used to Excel VBA which
provides many more functions and makes more sense, at least to me.

Word VBA is powerful, but the task you are facing involves too many human
decisions to be performed reliably by any code...

Glad to see you worked out a solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top