Can I use a macro to break up doc into separate files?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi All,
I have a long document (a user's manual) that I want to break up into
a number of separate HTML files. Ultimately, these will become my online
help (compiled HTML).

I don't know of any way to simply convert from a Word dco to a .chm
file, so I'm wondering about a macro to break the document up for me. At
least that much of the conversion will be done for me.

Each section of the doc has a number of Headings of various levels
included. Ultimately, I'd like to select all the text from each Heading 1
to the next Heading 2, or Heading 1 if no Heading 2 exists. If a Heading 2
exists, I want to select all the text from it to the next Heading 2, or
Heading one if there isn't another one.

Once the text is selected, I want to save it to an HTML file, named
whatever the Heading text is.

I know my way around Visual Basic, but know mext to nothing about
Word. Is what I want to do a reasonable thing? Is it possible that this
has been done before, and some macro code is already out there somewhere?

- Max
.



Relevant Pages

  • Re: LISTNUM & Wildcards
    ... "Jay Freedman" wrote: ... That's what the macro looks for. ... are the heading numbers just ordinary typed ... Listnum), try to translate those three characters to a number (which ...
    (microsoft.public.word.docmanagement)
  • Re: LISTNUM & Wildcards
    ... That's what the macro looks for. ... are the heading numbers just ordinary typed ... Listnum), try to translate those three characters to a number (which ... "Jay Freedman" wrote: ...
    (microsoft.public.word.docmanagement)
  • Re: LISTNUM & Wildcards
    ... I loaded the macro and ran it; ... Is the reason it didn't work is you say < 4 but my heading is 4.0? ... "Jay Freedman" wrote: ... For each Listnum \l 2 it finds, it needs to examine the value ...
    (microsoft.public.word.docmanagement)
  • Re: Styles help
    ... Heading 0 style. ... This revision to the macro will avoid that error by changing the number from ... 'Apply List Format To Selection ... I other procedures have the same pattern. ...
    (microsoft.public.word.vba.general)
  • Re: Styles help
    ... Your other 'procedures' probably have a different pattern when you reveal ... were looking for in your original macro that you posted. ... But the heading ... To provide instruction for flushing the lube oil system on RFW DT 1B and RFW ...
    (microsoft.public.word.vba.general)