Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hомер строки столбца

0 views
Skip to first unread message

Evgeniy

unread,
Aug 3, 2006, 12:19:37 AM8/3/06
to
Всем Hi.
Думаю все знают как в VB MS Word ввести в определенную ячейку таблицы текст.
У меня другой вопрос:
Как в VB MS Word получить номер строки и столбца выделенной ячейки в
таблице?

Andrew Shelkovenko

unread,
Aug 6, 2006, 3:28:43 PM8/6/06
to
Hello, Evgeniy!
You wrote to All on Thu, 03 Aug 2006 08:19:37 +0400:

E> Как в VB MS Word получить номер строки и столбца выделенной ячейки в
E> таблице?

Cells Property

Returns a Cells collection that represents the table cells in a column, row,
selection, or range. Read-only.
For information about returning a single member of a collection, see
Returning an Object from a Collection.

The Item method returns a single object from a collection.
Если выделена больше чем одна ячейка, наверное их количество есть Count

'--------------------------
This example sets the current cell's background color to red.

If Selection.Information(wdWithInTable) = True Then
Selection.Cells(1).Shading.BackgroundPatternColorIndex = wdRed
Else
MsgBox "The insertion point is not in a table."
End If

With best regards, Andrew Shelkovenko.
<http://mira.xeno.ru/> - RQ Search and Replace


0 new messages