![]() |
|
#2
|
||||
|
||||
|
The function you posted appears to be an edited variant of code I've posted in threads such as:
https://www.msofficeforums.com/word/24807-how-do-i-convert-line-text-title.html https://www.msofficeforums.com/word-...html#post55885 It is not deigned to do as you say you want it to and wouldn't even do as it's supposed to with your modifications. For what you say you want, you could use a macro like: Code:
Sub Reformat()
Dim i As Long, StrChr As String, StrTmp As String
With Selection
For i = 1 To .Words.Count
StrChr = Left(.Words(i), 1)
If StrChr = LCase(StrChr) Then
StrTmp = StrTmp & LCase(.Words(i))
Else
StrTmp = StrTmp & StrChr & LCase(Mid(.Words(i), 2, Len(.Words(i)) - 1))
End If
Next
.Text = StrTmp
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Restrict Editing function disable insert textbox function
|
IanM_01 | Word | 5 | 11-21-2015 02:29 AM |
| IF Function | Azleenda | Excel | 2 | 11-10-2015 10:06 PM |
#REF! Error in calling VBA function disappears when function is copied
|
lcaretto | Excel Programming | 2 | 05-26-2014 07:19 PM |
| Creating a graph for Future Value function (FV function) | bmoody | Excel | 2 | 11-06-2013 10:52 AM |
| if function help | jim831 | Excel | 2 | 10-29-2010 07:06 PM |