home *** CD-ROM | disk | FTP | other *** search
- REM Description: Add a drop cap to the current paragraph
- REM Filename: dropcap.wmc
- REM Created by: Steven Wylie - 11/08/93
-
- REM Can't run if no document open
- IF GetDocName$() = "" THEN
- MESSAGE "Please create a new document or open an existing document first."
- STOP
- ENDIF
-
- REM Can't run in a graphic or table frame
- frameType% = GetFrameType()
- IF frameType% <> 0 THEN
- Message "The current frame must be a text frame."
- STOP
- ENDIF
-
- REM Can't run in frame mode
- ret% = ViewEditMode(1)
- IF ret% = 2 THEN
- ret% = ViewEditMode(2)
- BEEP
- STOP
- ENDIF
-
- REM Change the value of bold% to 0 if you don't want a bold drop cap.
- dropBold% = 1
-
- REM Get the current style information
- GetStyleFont typeFace$, size%, lineHeight%, bold%, italic%, underline%, strikeout%, hidden%, placeUnderline%, strikeoutChar$
-
- REM Use double the line height to calculate the drop cap height.
- dropSize% = lineHeight% * 2
-
- REM The drop cap line height is 75% of the drop cap size.
- dropLineHeight% = dropSize% * 75 / 100
-
- DefineStyle , 1
- DefineStyleDropCap typeFace$, dropSize%, dropLineHeight%, dropBold%, , , 1,
- EndDefineStyle 1
-
- ***** WARNING *****
- This is a WSWin macro file.
- Subsequent data is binary information and should not be modified.