Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: adee
 | Femeie 24 ani Mures cauta Barbat 24 - 59 ani |
|
TRaP
Moderator
Inregistrat: acum 7 ani
Postari: 827
|
|
You have to select a paragraph / sentence / some words / characters, then run the following code and you will get a message box telling you how many words, characters with spaces and characters without spaces are in your selection:
Sub GetWordsCount_Selection()
Dim W, Ch, ChSp As Long
W = Selection.Range.ComputeStatistics(wdStatisticWords) Ch = Selection.Range.ComputeStatistics(wdStatisticCharacters) ChSp = Selection.Range.ComputeStatistics(wdStatisticCharactersWithSpaces)
MsgBox "The selection has:" & vbCrLf & _ " - " & W & " words." & vbCrLf & _ " - " & ChSp & " characters with spaces." & vbCrLf & _ " - " & Ch & " characters without spaces."
End Sub
|
Source:
Modificat de TRaP (acum 6 ani)
|
|
pus acum 6 ani |
|