Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove 'Author' Information From Files...

Status
Not open for further replies.

OUCATS

IS-IT--Management
Feb 5, 2002
180
US
I know there are tools that can completely clean up all of the meta data that are in MS Office files, but I have a specific request. Our executive team does not want to see names of past employees on files that we still use daily and wants the 'author' field blanked out. I can not find a utility that will allow me to scan the network, find all Word or Excel files and to only blank out the 'author' field. I know I can open a file and remove the 'author' but I definitely don't want to have to do this by hand.

Any ideas???
 
it will cost you money. look into workshare protect.


misscrf

It is never too late to become what you could have been ~ George Eliot
 
I disagree on your quote (George Eliot).
I could have been a happy child.
It's too late now, isn't it ;-)

_______________________________________

Eman_2005
Technical Communicator
 
lol, not if you listen to your inner child. go swing on a swing. Let go of every care and just feel like you could fly.

True enlightenment comes of the acceptance, not the denial of what is possible. That is my lame attempt at zen today.

If the swing doesnt work, try toys r us. I have a hard time not playing with everything in there.

last resort - disney world.


misscrf

It is never too late to become what you could have been ~ George Eliot
 
Hi,
if you haven't changed documents' author manually yet - here's the vba code, uses office search engine, no error trapping.
I've tested it in office xp, should also work in 2k (FileTypes collection added in xp, not used here).
The code assumes excel - excel workbook action, can be adapted for other office documents (powerpoint, word). Just change .FileType value and use proper syntax to access document (open, close) and automation for other office application if necessary.
You can find more on office programming in forum707.

Code:
Dim offFS As Office.FileSearch
Dim offPT As Office.PropertyTest
Dim xlWbk As Workbook

Set offFS = Application.FileSearch
With offFS
    iPTCount = .PropertyTests.Count
    If iPTCount > 0 Then
        For i = iPTCount To 1 Step -1
            .PropertyTests.Remove (i)
        Next i
    End If
    .NewSearch
    ' set PropertyTests(1)
    .FileType = msoFileTypeExcelWorkbooks
    .LookIn = "C:\"
    .SearchSubFolders = True
    ' define PropertyTests(2)
    .PropertyTests.Add Name:="Author", Condition:=msoConditionIsExactly, Value:="Old author", Connector:=msoConnectorAnd
    .Execute (msoSortByFileName)
    For i = 1 To .FoundFiles.Count
        Debug.Print .FoundFiles(i)
        With Workbooks.Open(.FoundFiles(i))
            .BuiltinDocumentProperties("Author") = "New author"
            .Close (True)
        End With
    Next i
End With

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top