View Single Post
  #2   Report Post  
Dave O
 
Posts: n/a
Default Replace &F in header with text

Generally, the code looks like this:

Sub Filename_in_header()
With ActiveSheet.PageSetup
.RightHeader = "Doc No. " & Mid(ActiveSheet.Name, 1, 5)
End With
End Sub

This applies the first five characters of the filename to the header-
see the MID statement. You'll need to parse your filename to suit,
maybe with LEFT or RIGHT instead of MID, depending on how the data mgt
system adds its numeric value.