#### Topic: Selection of the text with lines and up to the end

an example of selection of the text in word with defined till a certain line

W.ActiveDocument. Range (Start: = 10, End: = 40).Select;

How to make selection not to 40, and up to the end?

#### Re: Selection of the text with lines and up to the end

Kovala;
Number of lines to count?

#### Re: Selection of the text with lines and up to the end

DarkMaster;
And if different documents and they big on volume?

#### Re: Selection of the text with lines and up to the end

Kovala;
W.ActiveDocument. Content () - returns to you Range () for all document. Descend on MSDN, look at examples (VBA).

#### Re: Selection of the text with lines and up to the end

Can by means of methods MoveDown and EndKey? Only I can not find them for delphi

#### Re: Selection of the text with lines and up to the end

Kovala wrote:

Can by means of methods MoveDown and EndKey? Only I can not find them for delphi

Can is better  esteem the documentation, instead of read tea leaves? A method "scientific " far you will not leave.

#### Re: Selection of the text with lines and up to the end

I esteemed the documentation but if to take these methods, I cannot understand what to do with unit, extend

#### Re: Selection of the text with lines and up to the end

Kovala;
Look, you found as to make selection:

W.ActiveDocument. Range (Start: = 10, End: = 40).Select;

I assumed that:

W.ActiveDocument. Content ()//- returns Range for all document.

You can in the first method as the rank beginning \end substitute results from ActiveDocument. Content ()?

#### Re: Selection of the text with lines and up to the end

Kovala wrote:

How to make selection not to 40, and up to the end?

According to the logic of Word operation, it is simple enough End not to specify.
W.ActiveDocument. Range (Start: = 10).Select;

#### Re: Selection of the text with lines and up to the end

DarkMaster;
For selection of all I took Selection. WholeStory

#### Re: Selection of the text with lines and up to the end

Boris wrote:

it is passed...
According to the logic of Word operation, it is simple enough End not to specify.
W.ActiveDocument. Range (Start: = 10).Select;

var Start:TObject

The result of this line is that that it selects not from 10 lines, and about 10 characters.

#### Re: Selection of the text with lines and up to the end

Kovala wrote:

the Result of this line is that that it selects not from 10 lines, and about 10 characters.

And this, so, selects from 10 lines?
&gt; Prividen an example of selection of the text in word with defined till a certain line

#### Re: Selection of the text with lines and up to the end

Sokolinsky Boris;
I simply did not check it, and took from a site. And how to make that since a line selected?

#### Re: Selection of the text with lines and up to the end

Kovala wrote:

I simply did not check it, and took from a site. And how to make that since a line selected?

I Will risk to assume that it is necessary to find the first character of a line.

#### Re: Selection of the text with lines and up to the end

Sokolinsky Boris;
Can tell please this code because I search and I can not find.

#### Re: Selection of the text with lines and up to the end

W.ActiveDocument. Range (Start: = ActiveDocument. Paragraphs [10].Range. Start).Select;

#### Re: Selection of the text with lines and up to the end

Boris wrote:

W.ActiveDocument. Range (Start: = ActiveDocument. Paragraphs [10].Range. Start).Select;

Now it appears that it is necessary to select not about 10 paragraphs, and from 10 lines ))

#### Re: Selection of the text with lines and up to the end

Sokolinsky Boris, Thanks you big!

#### Re: Selection of the text with lines and up to the end

Then it is interesting and how to select purely first line, by an example of the author and yours tried so, however swears on End

w. ActiveDocument. Range (Start: = w. ActiveDocument. Paragraphs [1] .Range.Start,End:=w.ActiveDocument.Paragraphs [1].Range. End).Select;

#### Re: Selection of the text with lines and up to the end

Roken;
How swears?
On what of two End'?
You as the housewife, a ches-word....

#### Re: Selection of the text with lines and up to the end

Arioch, on End:TObject and before to appropriate

#### Re: Selection of the text with lines and up to the end

And all the same, what words was specific swears? Whether difficultly the text to copy that?

Arioch,

#### Re: Selection of the text with lines and up to the end

And generally, on common sense, the end of the first paragraph is the beginning of the second paragraph a minus one character (#10 if I am not mistaken)

Roken wrote:

and how to select purely first line

There is no "purely first line"
There is purely first paragraph in which lines will break  on a miscellaneous, depending on  papers, the size of fields, the size of letters and still lines knows   parameters.
In the paragraph there can be spets-symbols of a new line - #13
However, in the specific codes of spets-symbols I can be mistaken, it is necessary to look in Word windows

#### Re: Selection of the text with lines and up to the end

It is amusing. Instead of simply copying the text - start pictures to save in a file...
Well, it is impossible to use keywords as titles, I and with to the beginning was surprised that End transits. Does not transit, normally.
Another means there instead of End something....
http://stackoverflow.com/a/18126441/976391
If this recipe is valid - use a prefix before this name
&End