Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jul 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cleanse your dodgy dossier (ALL)

    Unfortunately the method for extracting the history in Word documents of the last 10 authors/file paths is beyond my current ability to work out. If it is not a State secret is it possible to have a description of how to do it??
    Thanks

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

    Re: Cleanse your dodgy dossier (ALL)

    I can't tell you the exact details, but you can see a lot of what a Word document stores as follows:

    Select File | Open...
    In the 'Files of type' dropdown list, select 'Recover text from any file (*.*)'.
    Select a document and click Open.

    You will see the text of the document without formatting, followed by various information (what and how much depends on the document). The editing history is somewhere in there. Try it out on a document of your own. Don't save it - you'll ruin the document.

  3. #3
    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: Cleanse your dodgy dossier (ALL)

    Not a State secret, exactly... There is no publicly documented programming interface to access the information. Microsoft does have documentation on the OLE container structure of Word and other Office file formats, but you would need to sign a nondisclosure agreement directly with Microsoft to obtain it. (I have not seen it.)

    While I also haven't tried to go at it as a binary data stream, one might be able to work it out in a few hours with a good body of sample documents and the hints provided by Recover Text From Any File.

  4. #4
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cleanse your dodgy dossier (ALL)

    Hi Jefferson,

    I found this post and tried it on a PC with Windows 98 SE and Word 97, both Dutch version and fully updated.
    But unfortunately it doesn't work. Everytime I get an "illegal operation" error, after Word closes. This occurs executing the line:

    Set newDoc1 = Documents.Add(Template:=docTarget.FullName, newtemplate:=True)

    Any ideas?

  5. #5
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Calgary, Alberta, Canada
    Posts
    818
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Cleanse your dodgy dossier (ALL)

    If you go to this site http://www.javacoolsoftware.com/products.html and check out a product called <font color=448800>Doc Scrubber</font color=448800> , it might help. They also have some other useful downloads - free for personal use. <img src=/S/compute.gif border=0 alt=compute width=40 height=20>

    Regards,

    Ron M <img src=/S/smile.gif border=0 alt=smile width=15 height=15> <img src=/S/smile.gif border=0 alt=smile width=15 height=15> <img src=/S/smile.gif border=0 alt=smile width=15 height=15> ]

  6. #6
    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: Cleanse your dodgy dossier (ALL)

    I can't recall whether I ever used this technique in Word 97. Perhaps it or your OS (or your server OS, if the activedocument is on the server) is misbehaving in an unexpected manner. What happens if you try just the following in the Immediate window of the VBE? You will need to have some already-saved document active. (Please save your work first!)

    documents.Add activedocument.FullName, true

    If this causes the error, then maybe there's no solution. Otherwise, perhaps it's something in the code. Oh, probably it's best if the document being cloned doesn't contain an AutoNew macro, just in case there is some conflict there.

  7. #7
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cleanse your dodgy dossier (ALL)

    This also causes the illegal operation error. So it seems that this method is not working in Word 97. <img src=/S/disappointed.gif border=0 alt=disappointed width=15 height=15>
    Thanks anyway.

    Added: But it made me a Starlounger! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

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

    Cleanse your dodgy dossier (2000+)

    Apr. 5, 2004 - Subject line edited to indicate that procedures appear not to work in at least some versions of Word 97 (see <post#=360435>post 360435</post#>).

    I refer to today's issue of Woody's Office Watch, #8.27, regarding the history in your Word documents of the last 10 authors/file paths. There is a method for removing all previous file save history out of a document, which I call cloning. To do this manually, you:
    1. <LI>Save your document as a template; then
      <LI>Create a new document based on the template.
    The new document will have all of the same text, formatting, document properties, etc., but none of the prior document's history. Once you save your new document, you will start creating its history.

    This can be automated, of course, using a macro. When the Lounge moves to its new home, a link to <post#=85627>post 85627</post#> will tell you the background. Here's just the code:

    <pre>Sub CloneMe()
    'Duplicate the current document as a new document (without the historical trail)
    '2001-06-09 Jefferson Scher
    If Documents.Count < 1 Then 'there are no open docs
    MsgBox "Open a document and then try this again."
    Exit Sub
    End If

    If MsgBox("Clone the current document as a new document?", vbQuestion + vbYesNo) _
    <> vbYes Then Exit Sub

    If ActiveDocument.Saved = False Then
    If MsgBox("The clone is made from the last saved version of this document. Save now?", _
    vbQuestion + vbYesNo) = vbYes Then
    ActiveDocument.Save
    End If
    End If

    Dim docClone As Document
    Set docClone = MakeClone(ActiveDocument)
    docClone.Activate
    Set docClone = Nothing

    'remind user that s/he is starting the process anew
    MsgBox "Here is your clone! Document will store the path on which you next save it."
    End Sub

    Public Function MakeClone(docTarget As Document) As Document
    'functionized 10/28/01
    Dim newDoc1 As Document, strTempTempPath As String, newDoc2 As Document
    'create template from current document, save and close it, terminate the object
    Set newDoc1 = Documents.Add(Template:=docTarget.FullName, newtemplate:=True)
    strTempTempPath = "c:jfstemptemplate.dot"
    newDoc1.SaveAs FileName:=strTempTempPath, fileFormat:=wdFormatTemplate
    newDoc1.Close
    Set newDoc1 = Nothing
    'create new document from temporary template, change it to normal template
    Set newDoc2 = Documents.Add(Template:=strTempTempPath, newtemplate:=False)
    newDoc2.AttachedTemplate = NormalTemplate.FullName
    'delete the temporary template ? this file is "in use" for some reason
    Set MakeClone = newDoc2
    Set newDoc2 = Nothing
    End Function</pre>

    Maybe this will help reduce the risk of scandal in your office. <img src=/S/innocent.gif border=0 alt=innocent width=20 height=20>

Posting Permissions

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