Логотип
Культурный центр Танцевальное Убежище ЭКОМАГ - экономия топлива и экологичность автомобиля
Загрузка. Подождите.
Если ничего не происходит, попробуйте обновить страничку — сайт построен на технологии AJAX, может что-то заело, кроме того для работы сайта необходим JavaScript и вероятно, что браузер заблокировал сайт. Разрешите запуск скриптов. Если ваш браузер Internet Explorer добавьте сайт в надёжные узлы (справа внизу). После этого нужно обновить страницу.
Вы можете посмотреть версию для печати этой страницы.

If CurPar.Range.Tables.Count > 0 Then

' creating the temporary document for tables convertion

Dim TablesDoc As Document

Set TablesDoc = Documents.Add

CurPar.Range.Tables(1).Range.Cut

TablesDoc.Content.Paste

' formatting tables

While TablesDoc.Tables.Count > 0

' searching for the first simple table (with no tables inside)

Dim TablePar As Paragraph

Dim TableParIndex As Integer

For TableParIndex = TablesDoc.Paragraphs.Count To 1 Step -1

Set TablePar = TablesDoc.Paragraphs(TableParIndex)

' first finding the paragraph, that has a table inside

If TablePar.Range.Tables.Count > 0 Then

'taking the first one and checking, if it is a simple one

Dim IsSimpleTable As Boolean

IsSimpleTable = True

Dim InsideTablePar As Paragraph

For Each InsideTablePar In TablePar.Range.Tables(1).Range.Paragraphs

If InsideTablePar.Range.Tables.Count > 0 Then

If InsideTablePar.Range.Tables(1).Range <> _

TablePar.Range.Tables(1).Range.Paragraphs(1).Range.Tables(1).Range Then

IsSimpleTable = False

End If

End If

Next

' converting the simple table, just found

If IsSimpleTable Then

Dim TempTable As Document

' moving to the next table

TableParIndex = TableParIndex - TablePar.Range.Tables(1).Range.Paragraphs.Count

' converting this one

Set TempTable = GenerateHTMLTable(TablePar.Range.Tables(1))

TempTable.Select

If Not StyleExists(TempTable, NoFormattingStyle) Then

TempTable.Styles.Add Name:=NoFormattingStyle

End If

Selection.Style = NoFormattingStyle

TablePar.Range.Tables(1).Range.Select

TablePar.Range.Tables(1).Delete

Selection.Collapse direction:=wdCollapseStart

Selection.FormattedText = TempTable.Range

' freing unused document

TempTable.Close (False)

End If

End If

Next

Wend

' outputting

Output.Content.InsertAfter Text:=TablesDoc.Range.Text

' freeing unused document

TablesDoc.Close (False)

End If

 
 
Языки
Темы
Copyright © 2006 — 2009
Доктор Робот