Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-23-2016, 01:40 PM
macropod's Avatar
macropod macropod is offline From .doc file lists to .html file lists Windows 7 64bit From .doc file lists to .html file lists Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could do that with a macro like:
Code:
Sub SaveAllAsHTML()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, strDocNm As String, wdDoc As Document
strDocNm = ActiveDocument.FullName
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.doc", vbNormal)
While strFile <> ""
  If strFolder & "\" & strFile <> strDocNm Then
    Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
    With wdDoc
      .SaveAs FileName:=Split(.FullName, ".doc")(0) & ".htm", Fileformat:=wdFormatHTML, AddToRecentFiles:=False
      .Close SaveChanges:=False
    End With
  End If
  strFile = Dir()
Wend
Set wdDoc = Nothing
Application.ScreenUpdating = True
End Sub
 
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm

The macro includes it's own folder browser, so all you need do is run it and point it to thje folder to process; all documents in that folder will be re-saved as html files.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
convert doc to html, html



Similar Threads
Thread Thread Starter Forum Replies Last Post
From .doc file lists to .html file lists I want to create a lists within lists (nested merges) AndyS Mail Merge 10 12-11-2015 03:05 PM
File lists like windows explorer in onenote? karmajohn OneNote 0 07-22-2015 02:24 PM
Width in cm/inches in HTML file JM-R Word 0 09-08-2014 09:28 AM
From .doc file lists to .html file lists Import HTML into Word .doc file? Clueless in Seattle Word 1 07-31-2012 12:12 PM
VBA Code to Print Individual Resource Lists to a pdf File OTPM Project 0 05-24-2011 12:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft