in reply to changing format of the first word of every line in an HTML doc

Alternately, you may try to use Winword itself to do these changes, with some macros or similar. Afterall, it already has commands for moving by paragraphs and words.

You might even just be able to record a macro with the macro recorder that

  1. Moves to the beginning of the next paragraph
  2. Selects one word to the right
  3. Changes the formatting
and just execute this one in a loop.
  • Comment on Re: changing format of the first word of every line in an HTML doc

Replies are listed 'Best First'.
Re^2: changing format of the first word of every line in an HTML doc
by sharkyflip (Initiate) on Jan 13, 2011 at 12:59 UTC

    Sorry if it's too much to ask, but do you happen to have a Macro code for doing this (or any resource I can read to learn this)? =) I've browsed the default Macro list that comes with my MS Word 2007 but I can't find anything that suggests selecting a portion of text from a given line. Besides, I'm not familiar with the VB API for automating MS Office software.

    Thanks in advance!

      There's a macro recorder that lets you perform actions just like you normally would, and writes these actions to a macro as readable statements. You start recording a macro with it, then hit control-downarrow to go to beginning of the next paragraph, then hit control-shift-rightarrow to select a word, then apply some formatting, then stop the macro recording. Play the macro a few times to make sure it works. Then open the macro for editing and try add a loop around it.