Syntax
FormatDropCap [.Position = number] [, .Font = text] [, .DropHeight = number or text] [, .DistFromText = number or text]
Remarks
Inserts a frame for the first character of the current paragraph so that it becomes
a dropped capital letter. The arguments for the FormatDropCap statement correspond to the options in the Drop Cap dialog box (Format menu).
Argument | Explanation |
.Position | Specifies the positioning for the dropped capital letter or removes dropped capital letter formatting. 0 (zero) or omitted No dropped capital letter formatting 1 Dropped (lines in the paragraph wrap around the dropped capital letter) 2 In Margin (lines in the paragraph remain flush) |
.Font | The font you want for the dropped capital letter |
.DropHeight | The height of the dropped capital letter specified in lines of surrounding text |
.DistFromText | The distance between the dropped capital letter and the rest of the paragraph in points or a text measurement |
Example
This example makes the first character of every section a dropped capital letter. The instruction .EditGoTo .Destination = "s" moves the insertion point to the beginning of the following section. As soon as the function CmpBookmarks("tmp", "\Sel") returns a value of 0 (zero), indicating that the insertion point did not move and that there are no more sections, the temporary bookmark is deleted and the macro ends.
StartOfDocument FormatDropCap .Position = 1, .DropHeight = "3" EditBookmark .Name = "temp", .Add EditGoTo .Destination = "s" While CmpBookmarks("temp", "\Sel") <> 0 FormatDropCap .Position = 1, .DropHeight = "3" CharLeft EditBookmark .Name = "temp", .Add EditGoTo .Destination = "s" Wend EditBookmark .Name = "temp", .Delete
See Also
FormatFrame, InsertFrame