Date Field in Header

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The company I work for has a form for logging when a room or locker has been
checked and/or cleaned. The form is printed out and completed manually by
the employees. Instead of printing up a form each day, I would like to print
an entire month. Is there a way to have the date advance by one day in the
header instead of going in and manually changing the date each time I print?
 
You could use the page number. For example, for July, you could use
7/{PAGE}/2007. You'd get a page for every day of the month, not just the
business days, but you wouldn't have to print all of them.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"(e-mail address removed)"
The company I work for has a form for logging when a room or locker has been
checked and/or cleaned. The form is printed out and completed manually by
the employees. Instead of printing up a form each day, I would like to print
an entire month. Is there a way to have the date advance by one day in the
header instead of going in and manually changing the date each time I
print?
 
Following on from Suzanne's clever idea (which is much simpler than date
calculations - www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902) if
you used a combination of

{Date \@ "MM"}/{Page}/{Date \@ "yyyy"}
or
{ Page }{ Date \@"/MM/yyyy" }

and copy the form to create 31 page document, then add the following macro

Sub PrintAMonth()
Dim sPages As String
Dim sMonth As String
Dim sLeap As String

Start:
sMonth = InputBox("Print forms for which Month number 1 - 12?", _
"Print Forms", Format(Date, "M"))
sPages = "1-31"
If sMonth > 12 Then
MsgBox "There are only 12 months in a year!", vbCritical, ""
GoTo Start:
End If
If sMonth = 2 Then
sLeap = MsgBox("Is this a leap year?", vbYesNo, "")
If sLeap = vbYes Then sPages = "1-29"
If sLeap = vbNo Then sPages = "1-28"
End If
If sMonth = 4 Then sPages = "1-30"
If sMonth = 6 Then sPages = "1-30"
If sMonth = 9 Then sPages = "1-30"
If sMonth = 11 Then sPages = "1-30"
'ActiveDocument.PrintOut Pages:=sPages
MsgBox sPages
End Sub


The macro will create the required number of dated forms each month.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top