| | |
Line Count in MSword using vb.net
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Sep 2008
Posts: 36
Reputation:
Solved Threads: 0
you could use the streamreader.Readline() and you must declare a variable of value Integer. After declaration make a loop until the End Of File is reached, and for each line that read then plus 1 to the value of the counter.
Hope i helped,
Alex
sr = Streamreader
Example:
Hope i helped,
Alex
sr = Streamreader
Example:
VB.NET Syntax (Toggle Plain Text)
While (End of File is reached) sr.Readline() counter += 1 End While
Hmmm...
If The Above Doesn't Work, It Might Be:
VB.NET Syntax (Toggle Plain Text)
dim objWord dim myDoc Set objWord = New Word.Application Set myDoc = objWord.Documents.Add("filename") msgbox myDoc.BuiltInDocumentProperties("NUMBER OF LINES").Value
VB.NET Syntax (Toggle Plain Text)
msgbox objWord.BuiltInDocumentProperties("NUMBER OF LINES").Value
Last edited by Comatose; Dec 31st, 2008 at 1:45 am.
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Transparent Treeview
- Next Thread: Visual Style Rendering in Visual Basic
| Thread Tools | Search this Thread |
.net .net2008 2005 2008 access account add application array basic beginner browser button buttons center check click code combo cpu crystalreport cuesent database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel exists fade file-dialog filter forms ftp generatetags html images input insert intel listview mobile module monitor mysql net number open output panel passingparameters picturebox picturebox2 port print printing printpreview problem regex reuse right-to-left searchvb.net select settings shutdown socket sqldatbase sqlserver storedprocedure survey tcp temperature textbox timespan transparency trim txttoxmlconverter user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet vista visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year






