Hi
I am working at a large charity organisation wiht many computer illterate people. What has happned is that many shared files are saved all over the place and are therefore easy to find.
I recorded a simple macro with toolbar button to put the path and filename in the footer. Easy. However, I have to do this for 60 staff members profiles. A little tedious but not a great problem.
What is a problem is suing th emacro in the existing files. I oculd open them apply the macro save and close but that would take forever. What I would like to do is find a way to apply the macro on existing doucments in one foul swoop without opening them all. Is this possible and if so could somebody please help to show me what code to use and where to put it to resolve this:
Sub Footer()
'
' Footer Macro
' Macro recorded 7/23/2009 by keithaisthorpe
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
If Selection.HeaderFooter.IsHeader = True Then
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
Else
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
End If
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
NormalTemplate.AutoTextEntries("Filename and path").Insert Where:= _
Selection.Range, RichText:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
Thanks
Keith