A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Date Field in Header



 
 
Thread Tools Display Modes
  #1  
Old July 2nd 07, 03:14 AM posted to microsoft.public.word.docmanagement
[email protected]
external usenet poster
 
Posts: 1
Default Date Field in Header

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?
Ads
  #2  
Old July 2nd 07, 05:11 AM posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
external usenet poster
 
Posts: 33,626
Default Date Field in Header

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
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"
wrote in message
...
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?

  #3  
Old July 2nd 07, 06:43 AM posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
 
Posts: 19,312
Default Date Field in Header

Following on from Suzanne's clever idea (which is much simpler than date
calculations - http://www.wopr.com/cgi-bin/w3t/show...?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
Word MVP web site http://word.mvps.org


Suzanne S. Barnhill wrote:
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.


"
wrote in message
...
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?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use current date in the default date form field option [email protected] Microsoft Word Help 4 April 8th 07 08:27 AM
I want a form field to figure a date based on the letter date. Virginia Native Microsoft Word Help 2 September 22nd 06 09:52 AM
How to get a date merge field to show a date 60 days in the future George Mailmerge 6 March 2nd 06 07:17 AM
Date issue merging from Excel field in Date format to Word Barb Reinhardt Mailmerge 1 December 17th 04 07:34 AM
How do i update a word document date field with a future date al Microsoft Word Help 2 December 6th 04 08:41 AM


All times are GMT +1. The time now is 08:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright 2004-2022 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.