473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

VB 6.0 - how to detect empty line in a Word document?

49
Accoding to you i tried for the code that deletes an empty line but can i do this?
Can i read the whole document line by line , thereby copying the line content into a string recording the line number, then checking for the length of string. If it comes to zero(0), then that is a empty line and then delete the line. I tried the below code which moves the cursor up from the end of the file by one line until the first line or the top of the file comes. During the cursor movement it gives the line number.The problem is i'm not getting the condition to check for the empty(blank) line. plz look into this. Thanking You

Do Until (linecount = 1)
wrdDoc.Application.Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdMove
linecount = wrdDoc.Application.Selection.Information(wdFirstCh aracterLineNumber)
wrdDoc.Application.Selection.Delete (This code deletes the line selected,if that is a blank line)
' End If
Loop
Feb 8 '07 #1
0 1086

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
13
by: vega | last post by:
How do I detect empty tags if I have the DOM document? For example: <br /> and <br></br> I tried org.w3c.dom.Node.getFirstChild(), it returns null for both <br /> and <br></br> I also tried...
23
by: Michel Bany | last post by:
I am trying to parse responseXML from an HTTP request. var doc = request.responseXML; var elements = doc.getElementsByTagName("*"); the last statement returns an empty collection when running from...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
1
by: aa | last post by:
If I have a long text which I copied from a Word document and pasted it into asp in order to output it into HTML, how do I detect new line in the text and insert Line Feed Carriage Return?
2
by: donkeybreath | last post by:
1. Load a html document into flash 2. add words from this html doc to an array or list by clicking on them 3. High lite these words one at a time with events 4. signal user to click on a word in...
0
by: donkeybreath | last post by:
1. Load a html or pdf document into vb 2. add words from this html or pdf doc to an array or list by clicking on them 3. High lite these words one at a time with events 4. signal user to click on...
1
by: Juan Alvarez | last post by:
Hi everyone, I have a problem here. Here is my code: private void wa_DocumentBeforeSave(Word.Document Doc, ref bool SaveAsUI, ref bool Cancel) { Cancel = true; ...
4
by: Marek Kubica | last post by:
Hi, I am trying to get this stuff working, but I still fail. I have a format which consists of three elements: \d{4}M?-\d (4 numbers, optional M, dash, another number) EMPTY (the <EMPTYtoken)...
1
by: David C | last post by:
I have an ASP.Net page that displays documents as hyperlinks from a network folder (intranet application). I also have a column that contains a hyperlink to open the document in Microsoft Word. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.