how do I creat a yearly calender on a postcard

  • Thread starter Thread starter Guest
  • Start date Start date
kathmk said:
how can I creat a yearly calender on a postcard

You might be able to do this in Access, but IMHO you'd have an easier
time using Word. Set up tables in Word for the calendars and define
Fields that display the dates.

If you have trouble fitting everything into post card size, print
something bigger (but with the same aspect ratio as a post card), and
then reduce it to the proper size later before printing.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
A yearly calendar on a postcard would get quite small. Here is the code to
draw the current month on a quarter of a page. I took my original code and
added " / 4" to make the full page calendar smaller.

If you are ambitious, you can take this code and loop through the months.

Private Sub Report_Page()
Dim lngDayHeight As Long
Dim lngDayWidth As Long
Dim datRptDate As Date
Dim intStartWeek As Integer
Dim lngTopMargin As Long
Dim dat1stMth As Date
Dim datDay As Date
Dim lngTop As Long
Dim lngLeft As Long
datRptDate = Date
dat1stMth = DateSerial(Year(datRptDate), Month(datRptDate), 1)
intStartWeek = DatePart("ww", dat1stMth)
lngDayHeight = 2160 / 4 'one & half inch
lngDayWidth = 1440 / 4 'one inch
lngTopMargin = 720 / 4 'half inch
Me.FontSize = 22 / 4
'loop through all days in month
For datDay = dat1stMth To DateAdd("m", 1, dat1stMth) - 1
'find the top and left corner
lngTop = (DatePart("ww", datDay) - intStartWeek) * _
lngDayHeight + lngTopMargin
lngLeft = (Weekday(datDay) - 1) * lngDayWidth
If Weekday(datDay) = 1 Or Weekday(datDay) = 7 Then
Me.DrawWidth = 8
Else
Me.DrawWidth = 1
End If
'draw a rectangle for day
Me.Line (lngLeft, lngTop)-Step _
(lngDayWidth, lngDayHeight), , B
Me.CurrentX = lngLeft + 50
Me.CurrentY = lngTop + 50
Me.Print Day(datDay)
Next
End Sub
 
Back
Top