powered by simpleCommunicator - 2.0.39     © 2025 Programmizd 02
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / numbered paragraphs from Word to Excel
10 сообщений из 10, страница 1 из 1
numbered paragraphs from Word to Excel
    #39566783
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
there are paragraphs in word
1.doc:
1. text
1.1. text
...
20.text
20.1. text
20.1.1. text
....
numbers of points to convert and excel
no text
1.xls:
1.
1.1.
...
20.
20.1.
20.1.1.

thank you.
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566795
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
>and excel
In excel
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566812
Казанский
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Amiri,
can you attach an example in Word & Excel? Where should the code run from - Word, Excel, vbs?
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566827
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
КазанскийAmiri,
can you attach an example in Word & Excel? Where should the code run from - Word, Excel, vbs?

sorry here is an example
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566828
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
in excel
A B
------
1 |
------
1.1 |
------
1.1.1|
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566831
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
I think to do so, save the word to txt file, remove the text leaving only the numbers. replace a character by another character for example · 183 267 B7. import Excel
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566833
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
crazy method. just to a head more comes nothing.
replace in excel different characters on the dot.
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566834
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
fu* up best practice (
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566845
Казанский
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Amiri,
try this in Word. Excel must be running, the code will create a new workbook and place text there.
Код: vbnet
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Sub bb()
Dim p As Paragraph, i&, s$
  With GetObject(, "excel.application").workbooks.Add(-4167).worksheets(1)
    .Columns(1).NumberFormat = "@"
    For Each p In ActiveDocument.Paragraphs
      i = i + 1
      .Cells(i, 1) = p.Range.ListFormat.ListString
      s = p.Range.Text
      .Cells(i, 2) = Left$(s, Len(s) - 1)
    Next
    .Application.Visible = True
  End With
End Sub
...
Рейтинг: 0 / 0
numbered paragraphs from Word to Excel
    #39566871
Amiri
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
КазанскийAmiri,
try this in Word. Excel must be running, the code will create a new workbook and place text there.
Код: vbnet
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
Sub bb()
Dim p As Paragraph, i&, s$
  With GetObject(, "excel.application").workbooks.Add(-4167).worksheets(1)
    .Columns(1).NumberFormat = "@"
    For Each p In ActiveDocument.Paragraphs
      i = i + 1
      .Cells(i, 1) = p.Range.ListFormat.ListString
      s = p.Range.Text
      .Cells(i, 2) = Left$(s, Len(s) - 1)
    Next
    .Application.Visible = True
  End With
End Sub


it really works ) thank. and you can remove all the text leaving only the numbers. there is a very large document points to 1.1.1 and to 500.43.1
best practices

in dog f1n(dot)in (contact f u in case)
...
Рейтинг: 0 / 0
10 сообщений из 10, страница 1 из 1
Форумы / Microsoft Office [игнор отключен] [закрыт для гостей] / numbered paragraphs from Word to Excel
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]