![]() |
![]() |
|
Заполнение документа MS Word из среды 1С:Предприятие .Заполнение закладок | ☑ | ||
---|---|---|---|---|
0
Ishimova
24.06.09
✎
14:37
|
Как прочитать все существующие закладки в документе MS Word. Т.е. мне не известно как называются закладки в документе, мне нужно в цикле прочитать их все .
|
|||
1
AlexYurg
24.06.09
✎
14:40
|
Разве в Word-е бывают закладки?
Опять я что-то пропустил... |
|||
2
Ishimova
24.06.09
✎
14:42
|
Вставка-Закладка
|
|||
3
AeDen
24.06.09
✎
14:43
|
(1) Вообще офисный пакет - темный лес. Там есть много того, о чем ты можешь даже и не догадаться и за сотню лет плотной работы с ним...
|
|||
4
AlexYurg
24.06.09
✎
14:43
|
(2) А-а.. ну да. Извиняюсь. Ступил. Перепутал с "Вкладками"
|
|||
5
Ishimova
25.06.09
✎
13:11
|
И чо- никто не знает?
|
|||
6
dk
25.06.09
✎
13:19
|
Bookmarks Property
See Also Applies To Example Specifics Returns a Bookmarks collection that represents all the bookmarks in a document, range, or selection. Read-only. For information about returning a single member of a collection, see Returning an Object from a Collection. Example This example retrieves the starting and ending character positions for the first bookmark in the active document. With ActiveDocument.Bookmarks(1) BookStart = .Start BookEnd = .End End With This example uses the aMarks() array to store the name of each bookmark contained in the active document. If ActiveDocument.Bookmarks.Count >= 1 Then ReDim aMarks(ActiveDocument.Bookmarks.Count - 1) i = 0 For Each aBookmark In ActiveDocument.Bookmarks aMarks(i) = aBookmark.Name i = i + 1 Next aBookmark End If This example applies bold formatting to the first range of bookmarked text in the selection. If Selection.Bookmarks.Count >= 1 Then Selection.Bookmarks(1).Range.Bold = True End If |
|||
7
Ishimova
25.06.09
✎
13:56
|
thank you, try understand
|
|||
8
Ishimova
25.06.09
✎
14:57
|
Огромное СПАСИБО. Все получилось!!!
// Прочитаем все закладки из документа Word СЗЗакладки=СоздатьОбъект("СписокЗначений"); если Док.Bookmarks.Count >= 1 тогда //считать для инд=1 по Док.Bookmarks.Count цикл имя_= Док.Bookmarks(инд).Name; СЗЗакладки.ДобавитьЗначение(имя_); конеццикла конецесли; |
|||
9
Ishimova
25.06.09
✎
14:58
|
Сначала конечно:
//Создание объекта Word документ WordApp=СоздатьОбъект("Word.Application"); NewDoc=WordApp.Documents; //Открітие файла Док=NewDoc.Add(сокрЛП(ТабЗнач.Путь)); |
Форум | Правила | Описание | Объявления | Секции | Поиск | Книга знаний | Вики-миста |