| | |
Line Count in MSword using vb.net
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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 arithmetic array basic beginner bing browser button buttons center check code combobox crystalreport cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel fade file-dialog filter forms ftp generatetags hardcopy html images input insert intel internet mobile monitor ms net networking objects open output panel passingparameters pdf picturebox picturebox1 port position printing problem project save searchvb.net select serial settings shutdown soap sqlserver survey tcp temperature text textbox timer timespan toolbox transparency trim update updown user vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vba vbnet view visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode year






