Consulting

Results 1 to 6 of 6

Thread: Turn on Track changes for all .doc in directory

  1. #1

    Turn on Track changes for all .doc in directory

    I am running Win 7 pro and Office 2007 pro...
    Before I send each employee their resume (.doc) to update (~200), I want to turn track changes on. Is there a macro I can run on the whole dir to open, turn track changes on, save, close? and how do i run the macro?

  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Yes. Use the Dir function. That is what it is used for: opening all documents in a folder (DIRectory), doing something, save and close them.

  3. #3
    Congratulations Short Timer!! What's next for you?

    here is what i came up with and it worked as a toggle. So the ones that already had Track Changes turned on got turned off.

    Sub TurnOnTC()
    '
    ' TurnOnTC Macro
    ' Turn on track changes for all documents in directory
    '
    FName = Dir("C:\Resume Project\*.doc")
    Do While (FName <> "")
    With wrd
    Documents.Open ("C:\Resume Project\" & FName), _
    ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
    PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
    WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
    wdOpenFormatAuto, XMLTransform:=""
    ActiveDocument.TrackRevisions = Not ActiveDocument.TrackRevisions
    ActiveDocument.Save
    ActiveDocument.Close
    End With
    FName = Dir
    Loop
    Set wd = Nothing
    End Sub

  4. #4
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Good one. That is how it is done.

  5. #5
    May I ask how would you get it to do subdirectories too? Thanks!!!

  6. #6
    VBAX Master
    Joined
    Feb 2011
    Posts
    1,480
    Location
    At that point, you'll want to use the FileSystemObject, do a search, come up with something, and then make a new thread probably

Posting Permissions

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