• Combine HTML files in Word? (MS Word 11)

    Author
    Topic
    #437231

    I would like to take a group of HTML files and place them in a word doc. Preferably, I would like to open 400 html files all at once in a word document and view them. These are files in Japanese characters, if that makes a difference…

    I have tried to open them all at once and I get a set of titles in the word file but not the entire html document.

    Is there a plug-in I could use to accomplish this?

    Please lmk. Thanks!

    Viewing 1 reply thread
    Author
    Replies
    • #1038824

      How do you open them? I tried to include a group of HTML files in a Word document using Insert | File… and it worked well – the contents of the HTML files was inserted into the Word document. I don’t think you should try this with all 400 files at once, though, I think Word will choke if you do that.

      • #1038829

        Well it just got a tad more complex doggone it. The client just came back and said that she wants the files listed in the document in the same order as they are displayed in the robohelp menu. I used Acrobat Standard to create a single PDF of the 400 files, but they are in alpha order.

        She says she thinks her only option at this point is to copy and paste the files one at a time into word from the robohelp toc. I tend to agree with her.

        Now I need to find a Robohelp forum that can provide an answer…

    • #1038828

      If you put all HTML files you want to combine into a folder containing no other HTML files, you can run the following macro:

      Sub InsertHTML()
      ' Modify as needed but keep the trailing backslash
      Const strPath = "C:MyFiles"
      Dim strFile As String
      Dim blnConfirm As Boolean

      On Error GoTo ErrHandler

      Application.ScreenUpdating = False
      blnConfirm = Options.ConfirmConversions
      Options.ConfirmConversions = False
      strFile = Dir(strPath & "*.htm")
      Do While Not strFile = ""
      Selection.InsertFile FileName:=strPath & strFile
      strFile = Dir
      Loop

      ExitHandler:
      Options.ConfirmConversions = blnConfirm
      Application.ScreenUpdating = True
      Exit Sub

      ErrHandler:
      MsgBox Err.Description, vbExclamation
      Resume ExitHandler
      End Sub

    Viewing 1 reply thread
    Reply To: Combine HTML files in Word? (MS Word 11)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: