How to save individual HTML pages?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to save individual HTML pages from Word2003? This really
should be an option!

If there is a macro, I'd appreciate a link or if the code can be posted
here. After scouring the web I tried a macro called sub splitter that was
written in VB for Word 97 but doesn't work in Word2003.

Thanks in advance for any help.
 
raylaur said:
Is there a way to save individual HTML pages from Word2003? This really
should be an option!

Well, there are those who would argue "No, it shouldn't" because Word is
*not* a web design program. Depending on which version of Office you have
you will find that PowerPoint & Publisher *both* provide such capability, as
does Front Page.
If there is a macro, I'd appreciate a link or if the code can be posted
here. After scouring the web I tried a macro called sub splitter that was
written in VB for Word 97 but doesn't work in Word2003.

Thanks in advance for any help.

And you're probably fortunate that it doesn't... It's typically a far better
result if you use the right tool rather than trying to hack another into
doing a job for which it isn't intended :-)
 
Dude - if you're going to reply why not offer something helpful?

There are valid reasons why it would be of value. I work in corporate
training and most course developers are fluent with Word. It is more
economical to develop documents in one program and save them as both PDF and
HTML. Create once, publish multiple formats. They are not designers and don't
get into things like FrontPage or Dremweaver. PowerPoint is too clumsy a tool
for anything but bullet slides.
 
Dude????

Word won't do what you want & what I suggested are sound & viable
alternatives. It doesn't make the reply less than helpful simply because it
wasn't what you would prefer.

Good Luck |:>)
Bob Jones
[MVP] Office:Mac
 
I agree with Bob that this is not a good idea. Word document format is
incompatible with html format and saving a document to html will have little
relationship to the original document layout. Furthermore html does not
support 'pages' nor does it support page headers/footers and a variety of
other things that could make up your document. However, the following macro
will split a document, in Word 2003, by 'page' and save each 'page' as an
html format document. Don't blame us if it doesn't do what you imagine.

Sub SplitByPage()
Dim mask As String
Letters = ActiveDocument.Bookmarks("\page").Range
mask = "ddMMyy"
Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
Application.ScreenUpdating = False
sName = "Split"
Docname = "D:\My Documents\Test\Merge\" _
& sName & " " & Format(Date, mask) & " " & LTrim$(Str$(Counter)) &
".htm"
On Error GoTo oops:
ActiveDocument.Bookmarks("\page").Range.Cut
Documents.Add
With Selection
.Paste
.EndKey Unit:=wdStory
.MoveLeft Unit:=wdCharacter, Count:=1
.Delete Unit:=wdCharacter, Count:=1
End With
ActiveDocument.SaveAs FileName:=Docname, _
FileFormat:=wdFormatHTML
ActiveWindow.Close
Counter = Counter + 1
Application.ScreenUpdating = True
Wend
oops:
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Back
Top