|
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 lngBackUpToNonHiddenText()
' Procedure : lngBackUpToNonHiddenText
' Description: Move the cursor backwards until start of document OR non-hidden text is reached.
' Copyright: Chris Greaves
' Inputs: None.
' Action: None.
' Returns: The count of characters moved.
' Assumes: None.
' Side Effects: The text cursor will have moved if a non-zero value is returned.
' Tested: By the calls shown below.
Dim lngCount As Long
While (Selection.Font.Hidden = True) And (Selection.Range.Start <> 0)
Selection.Move Unit:=wdCharacter, Count:=-1
lngCount = lngCount + 1
Wend
lngBackUpToNonHiddenText = lngCount
If (Selection.Font.Hidden = True) Then
Selection.Font.Hidden = False
Selection.TypeText " "
Else
End If
'Sub TESTlngBackUpToNonHiddenText()
' MsgBox lngBackUpToNonHiddenText
'End Sub
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 |