I use the following code to add the pathname in a footer.
Private Sub Workbook_beforePrint(cancel As Boolean)
For Each sht In ActiveWorkbook.Sheets
Ampersand = Chr(38)
Quote = Chr(34)
FooterFormat = "Arial"
FooterTextSize = "8"
FooterText = ActiveWorkbook.FullName
Formatting = Ampersand & Quote & FooterFormat & Quote & Ampersand & FooterTextSize
FOOTER = Formatting & FooterText
sht.PageSetup.LeftFooter = FOOTER
But sometimes it gives a result like
P:\test\demo.xls and another workbook with the same code gives
Sometimes the code gives the drive letter of the server, in this case P, and on another workbook it gives the fullname of the server.
I want to see the driveletter and not the fullname (P:\test\demo.xls ). How does this come and what can I do about it?