Doc name and page # in header by DA
DA
Tue Jul 06 17:36:17 CDT 2004
Hi Craig
Check the post from the 5th "Damaged word files?."
It will show you how to open your documents sequentially.
As to your header, if you do a search through the MS VBA
help files, there's all sorts of useful examples in there
(case in point below):
With ActiveDocument.Sections(1).Headers
(wdHeaderFooterPrimary)
.PageNumbers.Add _
PageNumberAlignment:=wdAlignPageNumberCenter, _
FirstPage:=False
End With
All the best,
Dennis
>-----Original Message-----
>I have a few hundred or so word doc's. I'd like a macro
>to open each one and insert the document name and page
>numbers (ie: NameOfDocument.doc page 1 of 5) into the
>header. Then, save and close the file, open the next,
etc.
>
>This would take forever if done by hand. Any
suggestions?
>
>Thanks!
>
>C
>.
>