Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2016, 03:11 AM
xuki xuki is offline From .doc file lists to .html file lists Windows 10 From .doc file lists to .html file lists Office 2007
Novice
From .doc file lists to .html file lists
 
Join Date: Feb 2016
Posts: 1
xuki is on a distinguished road
Question From .doc file lists to .html file lists

Hello everyone,

this is my first post. I have a new problem to resolve. I have like 1000 .doc files that i need to convert them in .html files. Is there a function/script/batch/program or something like this to help me, so i can convert them in one time?

Best regards to all



Thank you
Reply With Quote
  #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: 21,956
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
Reply

Tags
convert doc to html, html

Thread Tools
Display Modes


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 01:35 AM.


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