Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Nov 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Showing files that have comments in them (Word 2000)

    I'm an editor. Just as a book has chapters, a book project folder has files. Some project folders have 70 or 80 files (lots of little chapters). As I edit each file, I insert comments -- the ones with the little yellow stickynotes -- to keep track of things I have to research, and the MS isn't finished until I clean all those up. So anyway, as I clean things up, I delete the comments. When I'm all done, all the comments in all the files are gone. Pretty straightforward.

    Consider, 70 or 80 files, working on a project for a month -- by the time the project should be done, little snags in early chapters are long forgotten, and you have to open a file to see if there's a comment in there. They don't wave at you from the File Open dialogue box. And so it's easy to forget that a particular file has a question still hanging fire, and it doesn't get answered before it's time to ship off that MS to the graphics department. Sometimes the comment makes it into the galleys -- a bad thing! There's got to be a way to make Word help.

    Can Word display a list of which files in a folder have comments in them? How do I tell it to do that?

    Thanks for your help
    A.

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    I don't have a direct answer for you. However, in <post#=133116>post 133116</post#>, the user had a macro that opened documents & deleted graphics. Perhaps it can be modified to search for & report if any comment reference styles exist in a document. I would assume that you delete all the comment reference marks to delete the comments & only use the style for comments.

    You might even want two macros. One for information and one to double check & delete all comments before sending out the documents...in case you missed something. Of course, since I'm not a VBA expert, it's easy for me to come up with a solution that I can't carry out. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  3. #3
    4 Star Lounger
    Join Date
    Sep 2002
    Location
    Stafford, Staffordshire, England
    Posts
    585
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    Not wishing to stray out of my depth and appear foolish, I have a low tech solution that may serve as a temporary stopgap. When I am working on pupil records/reports or building up a stock of lessons for a scheme of work, I know that I will need to amend them before the tasks are completed. I tend to save my initial documents with a suffix appended to the filename, e.g atomsU.doc, where the U stands for unfinished. When I return and clean up I resave without the U and delete the original.
    Also, it may be easier to construct a macro that would recognise the suffix.
    Just a suggestion but given in good faith.

    Rob
    <font color=blue><font face="Script MT Bold"><big>Rob</big></font face=script></font color=blue>

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    Hi Rob:
    Thanks for that idea. I tend to think that the "low tech" solutions are often the best. And there are a number of freeware or shareware renaming utilities (or if you still have winfile.exe, you can rename everything in one fell swoop). Of course, that won't help determine which files you should rename.

  5. #5
    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: Showing files that have comments in them (Word 2000)

    Andrew, I'm curious whether you are using XP, because I don't seem to have an Application.FileDialog object/collection in Word 2000, which obviously presents significant issues for testing the macro.

    Also, you will want to change the ActiveDocument.Close line to:
    ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

  6. #6
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    Oops, and oops

    Yes I'm in XP. Yes, I'll fix that code <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    I'd been oscillating around how to open files.
    I'd started with Filesearch but have discovered it can go away for minutes at a time.
    I took to file objects as a last resort, and finally found filedialogue which I liked.
    Given the question was posted for 2000 I'll modify it and repost a corrected version that'll run there.

    Thanks for the comments

  7. #7
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    Editted by Andrew for more resillient code <img src=/S/compute.gif border=0 alt=compute width=40 height=20> and to work for 2000 rather than just XP <img src=/S/blush.gif border=0 alt=blush width=15 height=15>
    (Thanks to post that follows this)

    Try the following - open any file in the target directory and make sure that any changes to it have been saved prior to firing up the Macro.

    The Macro creates a new document containing hyperlinks to all those that contain comments. Hope that helps.

    Option Compare Text
    Option Explicit
    Sub TitlesList()
    ' This is a generic routine to obtain a set of files and then generate a document
    ' containing Hyperlinks to that set
    ' Designed so that simplistic tests of 'properties to filter' can select
    ' Documents with particular attributes
    '
    Dim FS As Variant
    Dim FO As Variant
    Dim FL As Variant

    Dim ListString As String
    Dim ListStringURL As String
    Dim I As Long
    Dim IMax As Long
    Dim MyTemp As String
    Dim MyDoc As String
    Dim MyPath As String
    Dim DocMustBeOpened As Boolean
    Dim DocWanted As Boolean


    MyPath = Application.Options.DefaultFilePath(wdDocumentsPat h)
    If Documents.Count > 1 Then
    If ActiveDocument.Path <> "" Then
    MyPath = ActiveDocument.Path
    End If
    End If

    ChangeFileOpenDirectory MyPath

    Set FS = CreateObject("Scripting.FileSystemObject")
    Set FO = FS.getfolder(MyPath)

    Documents.Add
    MyDoc = ActiveDocument.Name
    DocMustBeOpened = True

    For Each FL In FO.Files
    MyTemp = FL.Name
    If Right(MyTemp, 4) = ".doc" Then
    DocWanted = True
    If DocMustBeOpened Then
    Documents.Open FileName:=MyTemp, ReadOnly:=True, _
    AddToRecentFiles:=False
    If ActiveDocument.Comments.Count = 0 Then
    DocWanted = False
    End If
    ActiveDocument.Close savechanges:=wdDoNotSaveChanges
    End If
    Else
    DocWanted = False
    End If
    If DocWanted Then
    Documents(MyDoc).Hyperlinks.Add Anchor:=Selection.Range, Address:= _
    MyPath & "" & MyTemp, SubAddress:=""
    Documents(MyDoc).Paragraphs.Add
    Selection.MoveDown Unit:=wdParagraph
    End If
    Next
    Set FS = Nothing
    Set FO = Nothing
    End Sub

  8. #8
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    Jefferson

    This time ... ?

    I ran a test in my version of 2000 - the file opening is kludgy, simply because I don't know of a neat way to do a user driven directory browse in 2000.

    Any suggestions from anywhere?

    Andrew

  9. #9
    New Lounger
    Join Date
    Jul 2002
    Location
    Princes Risborough, Buckinghamshire, England
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    You can use API calls, but there's also an easier way. Full details are in an "IVB tips" e-mail that I kept when I received it on 8th October this year. You might find the full text by going to http://www.elementkjournals.com/tips.asp and searching for the tip called 'Leverage the "browse for folder" dialog box from your VB application'.
    In short, you create a project reference to the Microsoft Shell Controls and Automation component (exposed in shell32.dll), and use the BrowseForFolder method of an object set up as "Shell32.Shell". The tip includes sample code.

  10. #10
    5 Star Lounger
    Join Date
    Oct 2002
    Location
    Wellington, Wellington, New Zealand
    Posts
    621
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing files that have comments in them (Word 2000)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    I also found (in parallel) a reference via MVP pages (http://www.bmsltd.ie/mvp/) to something Jim Rech had gathered.

    Edited Mar 13th 2004 to update link

Posting Permissions

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