How automatically added file path into a new Word Document

It is difficult to find a file when you have more world files adding file path into it is the easy way to fine the relevant file.

During my 3 hrs effortless search on internet i find many difficult procedure i.e templates like that I try my best but I am not able to do so what I need.

I want that when I open MS word the file path is automatically is added in the footer of that file & the same in MS EXCE. I need the easy way or just one time effort next time when i open new world file it is automatically added.

It is possible? If so then kindly email me at *** Email address is removed for privacy ***

Thanks.

Perhaps

http://office.microsoft.com/en-gb/word-help/insert-headers-and-footers-HP001226486.aspx

 

Whilst that adds the file path to a doc, unless you have printed that doc, its not going to help you find a doc in explorer/Libraries

Perhaps you need to create more Folders in your Documents Libraries, then name the file appropriately in the relevant folder

Contributor since 2006
Currently win11 Pro & O365 Bus, multiple devices

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

If you want the path in the footer then insert a Filename field in the footer with a \p switch.
{ FILENAME \p } - use CTRL+F9 to set the bracket pair.

or

Use  a macro to insert the filename and path at the cursor http://www.gmayor.com/installing_macro.htm   

Sub InsertFileNameAndPath()
With ActiveDocument
    If Len(.Path) = 0 Then .Save
    Selection.TypeText .FullName
End With
End Sub


or

put the filename and path at the end of the document with a macro

Sub InsertFileNameAtBookmark()
Dim oBM As Bookmark
Dim oRng As Range
Dim bFound As Boolean
    With ActiveDocument
        If Len(.Path) = 0 Then .Save
        For Each oBM In ActiveDocument.Bookmarks
            If oBM.name = "bmPath" Then
                Set oRng = oBM.Range
                bFound = True
                Exit For
            End If
        Next oBM
        If Not bFound Then
            ActiveDocument.Range.InsertParagraphAfter
            Set oRng = ActiveDocument.Paragraphs.Last.Range
            oRng.Collapse wdCollapseEnd
            oRng.Paragraphs.Alignment = _
            wdAlignParagraphRight
        End If
        oRng.Text = ActiveDocument.FullName
        oRng.Font.name = "Arial"
        oRng.Font.Size = 8
        ActiveDocument.Bookmarks.Add "bmPath", oRng
    End With
End Sub


Graham Mayor (Microsoft Word MVP 2002-2019)
For more Word tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

You could also use a template (not normal template) that has a filename and path field in the footer.
See FileNamePathFooter Templates

Volunteering to "pay forward" the help I've received in the Microsoft user community.


Charles Kenyon
Sun Prairie, Wisconsin
wordfaq[at]addbalance[dot]com

Legal site: https://addbalance.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 7, 2024 Views 1,941 Applies to: