Tatum,
Ok, it's later in the day. Here is the macro code to set up your print
header. If you have limited experience setting up and running a macro,
just follow these steps.
1. First copy the code below to your clipboard
2. Go to Tools/Macro/Macros.
3. Overwrite whatever might be in the Macro Name box with the name,
"DateRangeHeader"
4. At the bottom of the Macros Window pick "Global template" from the
selection list of "Macros in".
5. Hit the "Create" button
6. When the editor window opens, delete the two default lines that are
in the window and paste the below code into the window. Note that line
continuation characters are a space followed by an underscore (" _")
7. Go to File/Save Global.mpt
8. The macro can now be run on any file by going to Tools/Macro/Macros
and selecting the macro name. Just make sure you are looking at macros
in the Global. Then hit "run".
If you want to try the macro without actually printing, comment out by
putting an apostrophe (comment indicator) in front of the line
"FilePrint" and remove the comment line indicator from the
"FilePrintPreview" line.
Sub DateRangeHeader()
Dim StRngDate As Date, FinRngDate As Date
'Define the date range limits and filter
StRngDate = InputBox("Enter date for start of date range", "Date Range
Beginning")
FinRngDate = InputBox("Enter date for end of date range", "Date Range
End")
FilterEdit Name:="TatumDR", taskfilter:=True, Create:=True, _
OverwriteExisting:=True, FieldName:="start", Test:="is less than or
equal to", _
Value:=FinRngDate, showinmenu:=False, showsummarytasks:=True
FilterEdit Name:="TatumDR", taskfilter:=True, operation:="And",
newFieldName:="finish", _
Test:="is greater than or equal to", Value:=StRngDate
FilterApply Name:="TatumDR"
'set up print option
ans = MsgBox("Ready to print?", vbYesNo, "Print option")
If ans = vbYes Then
FilePageSetupHeader Alignment:=pjLeft, Text:=ActiveProject.Name _
& " filtered for Date Range of: " & StRngDate & " to " & FinRngDate
FilePrint
'fileprintpreview
End If
End Sub
Hope this helps.
John
Project MVP