Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21843

[HELP] Finding longest word and count how much it repeated

$
0
0
Hi to everyone

I need help about finding longest word in .doc document, i loaded .doc document with one problem, speed. But that is not reason for opening this topic, i need help with finding longest word and counting how much that word has repeated.
Sorry for bad english.

Pozdrav svima


Code:

Dim WordAplikacija As Word.Application
Dim sadrzajA As Word.Range
Dim imeFajla As String
Dim sadrzajB As String
imeFajla = "C:\test123.doc"
Set WordAplikacija = New Word.Application

WordAplikacija.Visible = False

WordAplikacija.Documents.Open imeFajla, , ReadOnly

Set sadrzajA = WordAplikacija.ActiveDocument.Content

sadrzajB = sadrzajA

WordAplikacija.NormalTemplate.Saved = True

WordAplikacija.Quit
' Prwiev document in text box, this is not important
text1=sadrzajB


Viewing all articles
Browse latest Browse all 21843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>