Hi Kim,
The following macro will ask what year you want the calendar for and then
create it for the year that you entered:
Doug,
I tried your macro, and I like it, but still I prefer one that I found
several years ago written for WordPerfect 7. The macro works for WP 9
(the version I have now). I'll copy it here. Anyone with WordPerfect
who wants to give it a try, just copy and paste to a file named
7YEAR.WCM, then open that file with WordPerfect (ie, double click on
the file).
//************************************************************
// Macro Name: 7YEAR.WCM
// Description: Creates a full-year calendar that fits on a single
page.
// 70 Macros for WordPerfect 7 for Windows 95
// © Copyright 1996, IVY International Communications, Inc.
//************************************************************
Application (A1; "WordPerfect"; Default; "US")
YR:=?DateYear
MTH:=0
DialogDefine (100; 50; 50; 100; 70; 1+2+16; "Calendar Year")
DialogAddCounter (100; 120; 28; 10; 45; 15; 0; YR; 1900; 34646; 1)
DialogDisplay (100; 120)
If (MacroDialogResult=2)
Quit
EndIf
DialogDestroy (100)
If (((YR MOD 4)=0) AND ((YR MOD 100)<>0) OR ((YR MOD 400)=0))
FEB:=29
Else
FEB:=28
EndIf
If (NOT ?DocBlank)
FileNew ()
EndIf
MacroStatusPrompt (State: On!; Prompt: "Setting up margins and
columns")
FileNew()
MarginTop (MarginWidth: 0.3")
MarginBottom (MarginWidth: 0.3")
MarginLeft (MarginWidth: 0.3")
MarginRight (MarginWidth: 0.3")
FontSize (FontSize: 14p)
Justification (Justification: Center!)
Type (Text: "Year-At-A-Glance Calendar")
HardReturn ()
FontSize (FontSize: 12p)
Type (Text: "Shaded=Holiday; V=Vacation; P=Personal Day; S=Sick; ")
Type (Text: "T=Business Trip; O=Other (Described in Notes)")
Advance (Where: Down!; Amount: 0.1")
HLineCreate ()
HardReturn ()
HardReturn ()
FontSize (FontSize: 8p)
ColumnsDefinition (ColumnsType: Parallel!; VerticalSpacing: 1.6;
Spacing: 2.43"; SpacingDef: Fixed!; Spacing: 0.3"; SpacingDef: Fixed!;
Spacing: 2.43"; SpacingDef: Fixed!; Spacing: 0.3"; SpacingDef: Fixed!;
Spacing: 2.43"; SpacingDef: Fixed!)
ForEach (LASTDAY; {31; FEB; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31})
TableCreate (Columns: 7; Rows: 8)
MTH:=MTH+1
SelectTable ()
TableMarginLeft (Margin: 0.02")
TableRowMarginTop (Margin: 0.02")
TableRowHeight (RowHeight: Fixed!; Amount: 0.26")
SelectTableRow ()
TableJoinCells ()
TableCellAttributeOn (Attribute: ExtraLarge!; Attribute:
Bold!)
TableCellJustification (Mode: Center!)
TableCellNumberFormat (FormatType: DateFormat!)
TableCellNumberDateFormat (DateFormatNumber: 5)
TableFormula (Formula:
"DATETEXT(DATEVALUE("""+MTH+"/01/"+YR+"""))")
PosCharNext ()
WKDAY:=?LeftChar+?RightChar
DeleteWord ()
SelectWord ()
MTHNAME:=?SelectedText
MacroStatusPrompt (State: On!; Prompt: "Working on "+MTHNAME)
SelectMode (State: Off!)
PosWordNext()
DeleteToEndOfWord()
PosCellNext ()
SelectTableRow ()
TableCellVerticalAlignment (Alignment: Bottom!)
TableCellLine (Position: Top!; Style: NoLine!)
TableCellLine (Position: Inside!; Style: NoLine!)
TableCellAttributeOn (Attribute: Large!; Attribute: Bold!)
TableCellJustification (Mode: Center!)
SelectMode (State: Off!)
ForEach (DAYNM; {"Su"; "Mo"; "Tu"; "We"; "Th"; "Fr"; "Sa"})
Type (Text: DAYNM)
PosCellNext ()
EndFor
SearchString (StrgToLookFor: WKDAY)
MatchPositionBefore ()
SearchPrevious (SearchMode: Regular!)
PosTableCellDown ()
For (DAY; 1; DAY<=LASTDAY; DAY+1)
Type (Text: DAY)
PosCellNext ()
EndFor
While (?Row<>"8")
PosCellNext ()
EndWhile
TableSelectOn (SelectionMode: Cell!)
PosTableRowEnd ()
TableJoinCells ()
Type (Text: "Notes:")
PosDocBottom ()
HardPageBreak ()
EndFor
DeleteCharPrevious ()
Charlie Hoffpauir
[STOP THE GRAND PARKWAY]
http://members.manvel.net/charlieh/