Results 1 to 11 of 11
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Question on *.mht or *.mhtml files! (Word 2003)

    Is this file format new to Office 2003? I notice that when i choose File | Save as Web Page, the file format is Single File Web Page (*.mht).

    When I tried opening this file in Word 2000, I got this:
    <pre>MIME-Version: 1.0
    Content-Type: multipart/related; boundary="----=_NextPart_01C5D7E0.6C325050"

    This document is a Single File Web Page, also known as a Web Archive file.
    If you are seeing this message, your browser or editor doesn't support Web Archive files.
    Please download a browser that supports Web Archive, such as Microsoft Internet Explorer.

    ------=_NextPart_01C5D7E0.6C325050
    Content-Location: file:///C:/EECBE0E5/AchieversAttitudes-FocusedAttitude.htm
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/html; charset="us-ascii"

    <html xmlns:v=3D"urn:schemas-microsoft-com:vml"
    xmlns=3D"urn:schemas-microsoft-comfficeffice"
    xmlns:w=3D"urn:schemas-microsoft-comffice:word"
    xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
    xmlns:st1=3D"urn:schemas-microsoft-comffice:smarttags"
    xmlns=3D"http://www.w3.org/TR/REC-html40">

    ...
    ...
    ...
    </pre>


    It seems to be better, at least for now, to rather save in the standard HTML format if the file is to be shared between various browser and Word versions!!
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    The web archive (single web page) feature was introduced in Office XP (2002). If you have users with Office 97 or 2000, better not use it.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    Hans...I wish i knew this before i started creating currently more than 65 documents (acting as links to a Dbase that I'm creating!

    ONE HUGE REQUEST!!!

    Is there some VBA code to run in Word to convert all these files to HTML with a read-only password (or preferably a form password)?

    I'm thinking in the line...

    1. Use Dir function in VBA to open all the files in a certain directory.
    2. Loop opening them and re-saving as a HTML file
    3. Saving with a Form Password.
    4. Closing the file

    Any one with some code to do this?
    Sorry !
    Regards,
    Rudi

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    Protection for forms works only in a Word document. This feature is lost when you save as HTML, so I don't understand what you want.

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    Hmmm...sorry i did not think through that!

    If you consider my previous approach...
    In Word 2003 i saved the file as a *.mht file. But before I saved it, i added the readonly protection to the file. This meant that when the user clicks the link in the DB, the doc opens in the browser. But when the user opens the doc in Word, it opens as readonly where they also cannot make changes!

    Seeing that this format is not compatible with older Word versions, I need to convert my files to HTML, but when the user opens the HTML file in Word, it must also be readonly! If the forms protection will not work, I know the readonly one does.

    It boils down to the user must not be able to edit the original in either the browser (which is not the issue, or in word!!)

    Hope this is clear!
    Regards,
    Rudi

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    As far as I know, Word (at least not versions before Word 2003) doesn't have the option to open an HTML file in such a way that it cannot be edited.

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    OK...I'll see if I can experiment with the read-only bit later. For now the part thats the issue is to convert all those files to HTML. Any fast way of getting through that?
    (Is there a bat file that can do this too of stead of a macro to open save (with same file name) and close?)
    Regards,
    Rudi

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    Here is a macro:

    Sub Convert2HTML()
    Const strSourcePath = "C:This"
    Const strTargetPath = "C:That"
    Dim strFile As String
    Dim doc As Document

    On Error GoTo ErrHandler

    Application.ScreenUpdating = False
    strFile = Dir(strSourcePath & "*.doc")
    Do While Not strFile = ""
    Set doc = Documents.Open(FileName:=strSourcePath & strFile, _
    AddToRecentFiles:=False)
    doc.SaveAs FileName:=strTargetPath & Replace(strFile, ".doc", ".htm"), _
    FileFormat:=wdFormatHTML, AddToRecentFiles:=False
    doc.Close SaveChanges:=wdDoNotSaveChanges
    strFile = Dir
    Loop

    ExitHandler:
    Application.ScreenUpdating = True
    Set doc = Nothing
    Exit Sub

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

    Substitute appropriate paths in the constants at the beginning of the code (they may be the same), but keep the trailing backslash.

  9. #9
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Question on *.mht or *.mhtml files! (Word 2003)

    Tx Hans...Tx a stack...this will get me started at least. I'll figure out the read-only part later.
    Tx for your valued assistance today!
    Cheers, and have a great evening!
    Regards,
    Rudi

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Question on *.mht or *.mhtml files! (Word 2003

    There are add-ins for Word 2000. I doubt there are for Word 97.

    Download details: Office 2000 Add-in: Web Archive

    Download details: Word 2000 Web Archive Converter

  11. #11
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Question on *.mht or *.mhtml files! (Word 2003

    Tx for the add-ins Jefferson, I'll keep them on hand...but I still think that the HTML approach will be safer as lots of users will have this DB on their laptops...and I'd rather have a uniform file format than fuss with loading an add-in on all the PC's.
    Cheers for the links!!!
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •