For MS Word: View> Header and Footer>Insert Auto Text>File Name and Path.

For Excel : View>Header and Footer>Custom Footer. Follow instructions note therein.

(Works with Office XP)