Make file path for all Microsoft Document (Word, Excel, Powerpoint)

Is there anyway to make the system print file path for all document(old and new).

We're using Office 2010 with Windows 7 Pro.

Thanks.
LVL 9
pcchiuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xtermieCommented:
you can add this info to the header of the document if you want via a macro
do you have any type of Office files in the folder?
0
pcchiuAuthor Commented:
I know I can do it via a footer or header for the new document or manually apply it via a macro.

However I want to apply that to all existing document without the macro, is it something can be done on the printer or?

I only need that for Word, Excel, Powerpoint.

Thanks.
0
xtermieCommented:
You can definetely add this info in the header or footer of the files
Here is a snippet that will list all files in a directory
We can tweak the code to open any .doc files and add a header or footer with the info you want
Same for .xls files
LMK what you want more specifically and we can work on this.
Sub ListFilesinFolder()
Dim Test, sPath As String
Dim folder, oFSO As Object
On Error Resume Next
 
Set wbCodeBook = ThisWorkbook
sPath = "C:\Test\" 'your path
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set folder = oFSO.GetFolder(sPath)
  If folder = "" Then
      MsgBox "No Folder parameter was passed"
  End If
  Set folder = fso.GetFolder(sFolder)
  Set files = folder.files
  
  For Each folderIdx In files
    MsgBox folderIdx.Name
  Next
End Sub

Open in new window

0
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

xtermieCommented:
You can print lists of files with any of the following ways:
http://www.makeuseof.com/tag/5-ways-to-print-folder-and-directory-contents-in-windows/

If you want the info on each file printout, I can not think - at least for now- of a way apart from running a macro and adding automatically the info you want in the header or footer
0
pcchiuAuthor Commented:
I just need to print the file path for each document print out inside the document.
For example:  
I print a word document and the file on the desktop then on the footer...  I can do it for all new document via template however not sure how to do it for the existing file without user action...
0
xtermieCommented:
that is what I am saying.
Since you are doing it to the new files via template, you have to do it to the old files via a macro
Do you want me to write this macro (ie that will open all Word, Excel, PPT documents in a path and add the file path to the header of each document, save and close?)

Let me know
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pcchiuAuthor Commented:
I think there's no other choice and just need to make it via macro and apply it manually per each file then.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.