Visual Basic (VB and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

 

Please read the DISCLAIMER.

Here is an INDEX to all the procedures.

You will probably need one copy of my GLOBAL DECLARATIONS.



Public Function DropCapital(intMultiplier As Integer)
' Procedure :   DropCapital
' Description:  Increases the font size of the leading character of the current paragraph.
' By:           Chris Greaves Inc.
' Inputs:       INTEGER multiplier factor
' Returns:      None
' Assumes:      We are in a text paragraph.
' Side Effects: None
' Tested:       Invoke the procedure.
    ' Move to the end then start of the current paragraph
    Selection.MoveDown Unit:=wdParagraph, Count:=1
    Selection.MoveUp Unit:=wdParagraph, Count:=1
    If intMultiplier = 1 Then ' we obtain the second character font size
        Selection.MoveRight Unit:=wdCharacter, Count:=1
        Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Else
    End If
    ' Obtain the font size of the character
    Dim intFontSize As Integer
    intFontSize = Selection.Font.size
    ' Select the leading character
    Selection.MoveDown Unit:=wdParagraph, Count:=1
    Selection.MoveUp Unit:=wdParagraph, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    ' Increase its font size
    Selection.Font.size = intMultiplier * intFontSize
End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Thursday, November 15, 2001

 

 

Hosted by www.Geocities.ws

1

Visual Basic (VB and VBA)

Copyright 1999-2001 Christopher Greaves. All rights reserved.
Home Page and email to [email protected]
If in doubt, record a macro and inspect the entrails!

 

 

Please read the DISCLAIMER.

Here is an INDEX to all the procedures.

You will probably need one copy of my GLOBAL DECLARATIONS.

Public Function DropCapital(intMultiplier As Integer)
' Procedure :   DropCapital
' Description:  Increases the font size of the leading character of the current paragraph.
' By:           Chris Greaves Inc.
' Inputs:       INTEGER multiplier factor
' Returns:      None
' Assumes:      We are in a text paragraph.
' Side Effects: None
' Tested:       Invoke the procedure.
    ' Move to the end then start of the current paragraph
    Selection.MoveDown Unit:=wdParagraph, Count:=1
    Selection.MoveUp Unit:=wdParagraph, Count:=1
    If intMultiplier = 1 Then ' we obtain the second character font size
        Selection.MoveRight Unit:=wdCharacter, Count:=1
        Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Else
    End If
    ' Obtain the font size of the character
    Dim intFontSize As Integer
    intFontSize = Selection.Font.size
    ' Select the leading character
    Selection.MoveDown Unit:=wdParagraph, Count:=1
    Selection.MoveUp Unit:=wdParagraph, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    ' Increase its font size
    Selection.Font.size = intMultiplier * intFontSize
End Function

We all knew nothing when we started …
Home Page and Contact Information
Send email to [email protected].
This page was last updated Thursday, November 15, 2001

 

 

Hosted by www.Geocities.ws

1