1

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?

2

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

Kovala;
Number of lines to count?

3

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

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

4

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).

5

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

6

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.

7

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

8

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 ()?

9

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;

10

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

DarkMaster;
For selection of all I took Selection. WholeStory

11

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.

12

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?
> Prividen an example of selection of the text in word with defined till a certain line

13

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?

14

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.

15

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.

16

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

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

17

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 smile))

18

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

Sokolinsky Boris, Thanks you big!

19

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;

20

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....

21

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

Arioch, on End:TObject and before to appropriate

22

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?

23

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

Arioch,

24

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

25

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