ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I Automically add the file path to a new document? (https://www.excelbanter.com/excel-programming/397943-how-do-i-automically-add-file-path-new-document.html)

Shoretz & Company

How do I Automically add the file path to a new document?
 
I am using office 2007 and I need to have the file path automatically added
to new excel worksheets and word documents. I believe I have to use a macro
for this to work. I have found some macro code for this but none of them are
for Office 2007.

Barb Reinhardt

How do I Automically add the file path to a new document?
 
If you want it in a cell on a worksheet, use something like this

=CELL("filename",A1)

=LEFT(CELL("filename",A1),SEARCH("[",CELL("filename",A1))-2)


--
HTH,
Barb Reinhardt



"Shoretz & Company" wrote:

I am using office 2007 and I need to have the file path automatically added
to new excel worksheets and word documents. I believe I have to use a macro
for this to work. I have found some macro code for this but none of them are
for Office 2007.


Shoretz & Company[_2_]

How do I Automically add the file path to a new document?
 
Barb,

Thank you for your reply to my post. I don't think I was clear in my
question though. I need a macro that will automatically put the file path in
the footer of every document I open. I have found some Macro codes for
previous Office versions but none of them work on Office 2007.

"Barb Reinhardt" wrote:

If you want it in a cell on a worksheet, use something like this

=CELL("filename",A1)

=LEFT(CELL("filename",A1),SEARCH("[",CELL("filename",A1))-2)


--
HTH,
Barb Reinhardt



"Shoretz & Company" wrote:

I am using office 2007 and I need to have the file path automatically added
to new excel worksheets and word documents in the footer. I believe I have to use a macro for this to work. I have found some macro codes for this action but none of them are working with Office 2007.



All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com